safalkishore
03-14-2003, 10:03 AM
Im trying to chnage the cursor style to that of an hourglass when some processing is on in the page and set it back to default after that
Eg check below
<html>
<head>
<script language=javascript>
<!--
function showCursor()
{
window.document.body.style.cursor = "wait";
callTimer();
window.document.body.style.cursor = "default";
}
function callTimer()
{
for(i=0;i<10000;i++)
{
window.document.body.style.cursor = "wait";
document.write(i+"<br>");
}
}
//-->
</script>
<title></title>
</head>
<body>
<input type=text name=txt1>
<input type=button name=btn1 value="Click" onclick="showCursor()">
</body>
</html>
Eg check below
<html>
<head>
<script language=javascript>
<!--
function showCursor()
{
window.document.body.style.cursor = "wait";
callTimer();
window.document.body.style.cursor = "default";
}
function callTimer()
{
for(i=0;i<10000;i++)
{
window.document.body.style.cursor = "wait";
document.write(i+"<br>");
}
}
//-->
</script>
<title></title>
</head>
<body>
<input type=text name=txt1>
<input type=button name=btn1 value="Click" onclick="showCursor()">
</body>
</html>