Button timeout : Button : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Button »

 

Button timeout



<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>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Button