Greetings,
I am playing around with an alarm script, see:
But I would rather a pop-up window (HTML) appear than a dialog box, is this possible?Code:<script> var alarmTimer = null; var alarmSet; function setAlarm() { alarmSet = true; } function clearAlarm() { alarmSet = false; } function initAlarm() { if (alarmTimer!=null)clearInterval(alarmTimer); var nowTime = new Date(); clearAlarm(); document.exf1.h.value = nowTime.getHours(); document.exf1.m.value = nowTime.getMinutes(); document.exf1.s.value = nowTime.getSeconds(); alarmTimer=setInterval("countTime()",1000); } function matchH() { return (document.exf1.ch.value == document.exf1.h.value); } function matchM() { return (document.exf1.cm.value == document.exf1.m.value); } function matchS() { return (document.exf1.cs.value == document.exf1.s.value); } function countTime() { var nowTime = new Date(); document.exf1.ch.value = nowTime.getHours(); document.exf1.cm.value = nowTime.getMinutes(); document.exf1.cs.value = nowTime.getSeconds(); if (matchH() && matchM() && matchS()) { alert("ALARM!"); } } onload=initAlarm; </script>



Reply With Quote


Bookmarks