Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Date Redirect

Status
Not open for further replies.
May 12, 2002
51
US
Okay! Here's my issue: I would like users to be redirected to a specific page, each day, beginning at 3:00:00AM. Below is the script I'm currently using, but, I can't specify a time. Does anyone know how to add that in? Help! Thanks!!

----

var today = new Date();
var dayOfWeek = new Array("sun.asp","mon.asp","tue.asp","wed.asp","thu.asp","fri.asp","sat.asp");
var target = dayOfWeek[today.getDay()];
window.location = target;

----

Thanks!
-JusTin
 
for time it is today.getHours(),getMinutes(),getSeconds()

Known is handfull, Unknown is worldfull
 
How do I impliment that into the script.. for 3am?

Thanks!
-JusTin
 
u should use a timer function.
get the hours every second and when it is 3 a.m redirect the page...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top