pop up alert based on appointment time
Probably not optimal, but you can have a function that checks the time and sees if there are any appointments within 10 minutes. Popup a reminder if there is. Then you set this function to run periodically.
and to use objects of type date:
you can implement something similar to this code that I've written:
Hope that helps!
alert("in "+mins_alert+" minutes you will have an appointment!");
//get the current date
var now = new Date();
//get the next event (these values should come from a database or somewhere, and be update each time that the caller function is run...)
var next_event = new Date(month_str+day+", "+year+" "+hours+":"+mins+":"+secs);
var delta_millisecs = next_event.getTime()-now.getTime(); //difference, in milliseconds, between these the current date and the date of the next appointment
var delta_t = delta_millisecs-mins_alert*60*1000; //number of milliseconds between now to the alert event
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread