EarthWeb
Developer.com
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Book
thinking in java
 
Interact
forum
guest book
jobs
jokes
what's new

share code
 
Resource
add resource
modify resource
new resource
 

[Internet Jobs]
-----
Java by E-mail:

Get the weekly e-mail highlights on Java!
-----

-

Make a switch to another page after a delay


Author: Real Gagnon
Author's WebSite: http://tactika.com/realhome/realhome.html

Actually this is only HTML!


 <META HTTP-EQUIV="refresh" 
       CONTENT="5;URL=http://www.somewhere.com/aPage.html";>



"content" is the delay in seconds. Here we will wait 5 seconds before jumping to the specified URL.

To auto-refresh (reload) a page after the delay, the HTML solution is still good. A JAVASCRIPT alternative would be :


 <SCRIPT>
 var aTimer;

 function aReload() {
   location.reload(true);
   }

 function startReload() {
   aTimer = setTimeout("aReload()", 5000);
   }

 function stopReload() {
   clearTimeout(aTimer);
   }
 </SCRIPT>



Posted On: 10-Jul-1999

internet.commerce



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy