<html>
<head>
<title>Alarm Call Script</title>
<script language="JavaScript">
<!--
var alarmId;
function alarmFunc() {
alert("ALARM CALL!");
}
function startTimeout(id) {
var minutes = prompt("How many minutes?", 0);
alarmId = setTimeout("alarmFunc()", minutes*60000);
}
//-->
</script>
</head>
<body>
<form>
<input type=button value="Start" onClick="startTimeout()">
<input type=button value="Cancel" onClick="clearTimeout(alarmId)">
</form>
</body>
</html>
|