|
<html>
<head>
</head>
<body>
<form name="test">
<p>Make sure you have registered clocks.dll as follows:</p>
<p>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe Clocks.dll /tlb:Clocks.tlb /codebase</p>
<input type="button" id="bn_start" value="Start clock test" onClick="bn_start_onClick()"></input>
<input type="button" id="bn_stop" value="Stop clock test" onClick="bn_stop_onClick()"></input>
<p>
<span id="text_tag">0</span>
</p>
<script language=JScript>
function text_tag::onclick()
{
document.getElementById("text_tag").innerHTML = 0;
}
</script>
</body>
<script type="text/javascript" language="jscript">
var clock;
function bn_start_onClick()
{
//debugger;
alert('Press OK to start');
clock = new ActiveXObject("Clocks.clock");
var extendedClockEvents = clock.ExtendedClockEvents();
extendedClockEvents.ScriptCallbackObject = clock_Callback;
clock.Start(1000);
}
function bn_stop_onClick()
{
if (clock != null)
{
clock.Stop();
}
}
function clock_Callback(time)
{
document.getElementById("text_tag").innerHTML = time;
}
</script>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.