You are here: Re: Refreshing parts of a web site « HTML « IT news, forums, messages
Re: Refreshing parts of a web site

Posted by Neredbojias on 09/28/07 09:48

Well bust mah britches and call me cheeky, on Thu, 27 Sep 2007 15:08:20
GMT John scribed:

> On 26 Sep, 19:40, "J.O. Aho" <u...@example.net> wrote:
>> John wrote:
>> > 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.
>
> 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();

--
Neredbojias
Half lies are worth twice as much as whole lies.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация