Automatic updates
-
Hi How do webpages update themselves automatically, like the ones that shows the soccer scores during the world cup? tx
G'day.... One (simple) way is to use the JavaScript "setTimeout()" function. Eg: timeDelay = 30; // Time of delay before refresh in seconds. myTimer = setTimeout( "refreshThisPage();" , (timeDelay * 1000) ); function refreshThisPage() { document.location.replace("www.MyURL.com"); } Hope this helps!;) -- JON -- Good Fast Cheap... (Pick two, you can't have all three!)
-
G'day.... One (simple) way is to use the JavaScript "setTimeout()" function. Eg: timeDelay = 30; // Time of delay before refresh in seconds. myTimer = setTimeout( "refreshThisPage();" , (timeDelay * 1000) ); function refreshThisPage() { document.location.replace("www.MyURL.com"); } Hope this helps!;) -- JON -- Good Fast Cheap... (Pick two, you can't have all three!)
-
Hi How do webpages update themselves automatically, like the ones that shows the soccer scores during the world cup? tx
Hi, It is simple. Just add a META HTTP-EQUIV refresh tag.
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=http://www.some.org/some.html">
Check out this site for complete META tag usage: http://vancouver-webpages.com/META/metatags.detail.html[^] Deepak Kumar Vasudevan http://deepak.portland.co.uk/
-
G'day.... One (simple) way is to use the JavaScript "setTimeout()" function. Eg: timeDelay = 30; // Time of delay before refresh in seconds. myTimer = setTimeout( "refreshThisPage();" , (timeDelay * 1000) ); function refreshThisPage() { document.location.replace("www.MyURL.com"); } Hope this helps!;) -- JON -- Good Fast Cheap... (Pick two, you can't have all three!)
A variation on this would be to use the XMHTTP object with "setTimeOut()" for a partial refresh. Cheers, Simon "I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers. animation mechanics in SVG (latest pic 1) (latest pic 2)
-
Hi How do webpages update themselves automatically, like the ones that shows the soccer scores during the world cup? tx
there are a few ways of doing this.. one is with the META tag , which will reload the complete page after 100 seconds. another, which I prefer when I really am not interested in reloading the entire page, is with an IFRAME. You can create an individual page the has the necesary process (ASP, PHP, whatever) and reloads after a couple of seconds. of course you'll have a page called scores.asp that will do whatever you need to do and have the so that only that section of your page does the trick. IFRAMEs are pretty niffty since they work like a layer. You could even put it inside a cell of the main table of your site (for example). hope that works luck Jon x-zd Designs