View Full Version : my personal alarm clock via browser

Jul 26th, 2005, 06:00 PM
Hi, i'm trying to create myself a kinda browser alarm clock for fun and for learning, the page contains a sound file that play when the page is refreshed. i'm trying to have the sound play around 10 minutes before i work and 10 minutes after the 8hour shift, plus play around every hour during work time. The browser window will always be open. This is what i have so and am kinda lost at to the syntax:

browser_time = new Date(minutes);
loop until i==5 { // i =work days in the week

if (browser_time => 3:10pm) {
refresh page in 900 minutes //start of the next day

if (browser_time => 7:50am) {
refresh page every hour // i want sound every hour


if (i==5) {
refresh page in 3880 minutes //weekend=(fri.evening/sat/sun/mon.morning)
i=0; //after weekend reset counter