Jump to content

Have a <DIV> Refresh Another <DIV>


havanuf

Recommended Posts

This is my dilemma and I am not sure if I am handling the right way, so please suggest a new way or provide a valid answer so that I may achieve my goal.  Thanks in advance for your help in solving this matter.

 

In short I have a single "A.html" page that uses AJAX to load in "B.php" into a <DIV id='bDiv'> and "C.php" into another <DIV id='cDiv'>

 

The code in B.php generates a random number between 1 and 100. 

If the number generated is less than 10, I want <DIV id='cDiv'> to refresh its content.

 

I have tried a number of tricks, I could not find anything in jQuery so if there is please point me to the correct function calls.

 

Link to comment
https://forums.phpfreaks.com/topic/259597-have-a-refresh-another/
Share on other sites

using the same id should refresh it

 

when you display your content

 

tell it to go to #number and it will replace what is in the tags with the id of number

 

<div id="number"> </div>

 

or are you saying you dont know how to tell ajax to insert into an id on the page?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.