Refreshing parts of a web site

J

John

Hi,

Is there any way to update only a single object on a
web page (without using frames)? For instance a
picture that will change on a server depending on
some (server-side) state, for example the weather.

Just like an entire page can be refreshed, I want to
refresh just an image. It's ok to use XHTML or Java
script, although I don't know how to code it right now.

Regards,
John
 
J

J.O. Aho

John said:
Hi,

Is there any way to update only a single object on a
web page (without using frames)? For instance a
picture that will change on a server depending on
some (server-side) state, for example the weather.

AJAX script that checks the server every X minute and change the content of a
div if there is a change.
 
J

John

AJAX script that checks the server every X minute and change the content of a
div if there is a change.

Thanks. I found and modified a JavaScript that updates a div tag. But
right
now I activate the JavaScript function that posts the form to the CGI
script
with a button. How can I make a script that lies in the background and
calls my JavaScript update function once every minute or so?

/ John
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Thu, 27 Sep 2007 15:08:20
GMT John scribed:
Thanks. I found and modified a JavaScript that updates a div tag. But
right
now I activate the JavaScript function that posts the form to the CGI
script
with a button. How can I make a script that lies in the background and
calls my JavaScript update function once every minute or so?

Whatever the div-update code is, make it a function [say "divupdate()] and
do something like this

function repeatdivupdate() {
setInterval("divupdate()", 60000)
}
repeatdivupdate();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top