View Single Post
  #10 (permalink)  
Old June 12th, 2008, 01:31 AM
Old Pedant Old Pedant is offline
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

DUMBO ME!

An easier way to demo that alert stalls everything!

Code:
<script>
function changeTick( )
{
    document.getElementById("TOCK").innerHTML = (new Date()).getSeconds();
    setTimeout("changeTick()", 1000);
}
</script>
<body onLoad="changeTick( );">
<h1>Seconds: <span id="TOCK"></span></h1>
<P>
<a href="#" onclick="alert('See?  The clock can NOT update!');">demo</a>
</body>