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
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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.