Hi,
I want to change style of cursor while doing some javascript.
I made an example.
<html><head><script language=”javascript” type=”text/javascript”>
function go() {
document.getElementById(“info”).innerText = self.document.body.style.cursor;
self.setTimeout( “cont1()”, 5000 );
}
function cont1() {
self.document.body.style.cursor = “wait”;
document.getElementById(“info”).innerText = self.document.body.style.cursor;
self.setTimeout( “cont2()”, 5000 );
}
function cont2() {
self.document.body.style.cursor = “auto”;
document.getElementById(“info”).innerText = self.document.body.style.cursor;
}
</script></head>
<body onload=”go()”>
hello World, cursor style is: “<span id=”info”></span>”
</body></html>
If you start the script move mousecursor into browserwindow and wait. After 5 seconds style is changed but cursor is still ‘arrow’, you had to move mouse a bit and you get ‘hourglas’-style.
Is there a way to change cursorstyle without moving mouse?
Thanks, skriptor.