I have been using:
<script>
function change()
{
document.body.style.cursor="url('xx/xx.cur'),auto";
}
</script>
<div onClick="change()"></div>
It works, but its important that the cursor resets while there is no click so i tried the onBlur, but it didnt work.
At last I found this:
<script type="text/javascript">
function change() {
document.body.style.cursor=(document.body.style.cursor=="help") ? "default" : "help";
}
</script>
</head>
<body>
<div onmousedown="change()" onmouseup="change()"> </div>
which works like a charm, but it failed to replace the cursor standard styles with custom .curs.
Here:
function change()
{
document.body.style.cursor=(document.body.style.cursor=="url ('xx/xx3.cur')") ? "url ('xx/xx1.cur')" : "url ('xx/xx3.cur')";
}
</script>
</head>
<body>
<div onmousedown="change()" onmouseup="change()" id="container">
Obviously the double parentheses are troublesome. I tried everything without success. Any help apreciated. Thanks in advance.