View Full Version : Refresh a Div in a page ?

05-07-2008, 04:40 AM

I'm looking for a code/script which allows the user to refresh (via a button/link) a specific Div inside a Web page, without refresh the full page.

Do you have any idea how to do that?

Thanks a lot for your help :)

05-07-2008, 11:48 AM
I don't know if you want it to refresh as in, you just updated that div, and want people to see the new content? Or just change the div to something else.
If you want the first one then you may need ajax.

05-07-2008, 09:14 PM
As Nile said, are you looking for just updating the DIV from a file. I.e. you have:



div1 reloads say...file1

Or are you looking for something kind of like a automatic refresher for a page, but rather than refreshing the whole page just refresh your fantasy football stats display (just an example).

05-08-2008, 05:21 AM
In an AJAX environment this refresh can be done more efficient manner as we can update the content of the div in question based on the response from the server.