How to auto refresh a single DIV

RJM62

Touchdown! Greaser!
Joined
Jun 15, 2007
Messages
13,157
Location
Upstate New York
Display Name

Display name:
Geek on the Hill
Is this possible without using an iFrame?

The site / page haven't been written yet (I'm still banging things around in my head). Ultimately the site will be done in PHP, and the DIV will contain nothing except an include. The content in that include is what I want to auto refresh every minute or so, without having to refresh the rest of the page.

Thanks,

Rich
 
Is this possible without using an iFrame?

The site / page haven't been written yet (I'm still banging things around in my head). Ultimately the site will be done in PHP, and the DIV will contain nothing except an include. The content in that include is what I want to auto refresh every minute or so, without having to refresh the rest of the page.

Thanks,

Rich
You can do it with Javascript (AJAX). JQuery makes it fairly easy.

Keep in mind it's not going to behave exactly like an iframe without effort. It'll behave like a div with content that automagically appears and changes within it. Whereas an iframe behaves as an entirely separate browser instance inside the page.

If you haven't started playing with jQuery. Now is the time.
 
Last edited:
You can do it with Javascript (AJAX). JQuery makes it fairly easy.

Keep in mind it's not going to behave exactly like an iframe without effort. It'll behave like a div with content that automagically appears and changes within it. Whereas an iframe behaves as an entirely separate browser instance inside the page.

If you haven't started playing with jQuery. Now is the time.

Thanks, Jesse. Will do.

The iFrame would work well and I know how to make it work that way, but it's deprecated; so I figured this would be a good time to expand my skill set a bit.

Thanks again,

Rich
 
Back
Top