I have set onmousedown to change the cursor, but this setting is ignored
(IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the
mouse button is released. On Opera 7.01, the setting seems to be ignored
completely, even when I try with window.setTimeout.
So my two questions are: (1) Most important: Is there anything I can do
so that I don't have to wait for the next mouse event before the cursor
gets repainted. (2) Why is this not working for Opera at all?
The page below can also be found at http://csaba.org/demos/revert.htm
Things I have tried include window.setTimeout for the cursor change,
putting in a <STYLE> section and trying to change the cursor by means
of changing the class, faking a mouse event by putting in a fireEvent to
simulate a mouseMove. Same behaviour as above for all attempts.
This problem also happens on the other side. That is, in a situation
where I have changed the mouse cursor on the down click (subsequently
to moving the mouse) and then I want to revert it on a onmouseup, I
should move the mouse before the cursor changes. That's not nice.
Thanks for any tips,
Csaba Gabor from New York
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="content-type" content="text/html;charset=iso-8859-1">
<TITLE>Cursor changing demo</TITLE>
</HEAD>
<BODY bgcolor=gold style="margin-left:5%;margin-top:10%">
<DIV style="border:blue 1px solid"
onmouseout="this.style.cursor='auto'"
onmouseover="this.style.cursor='se-resize'"
onmousedown="this.style.cursor='move'">Click and drag</DIV>
<BR><BR><BR>
If you move the mouse over the DIV then its type should change to 'se-resize'.
<BR><BR>
If you now click (and hold) without moving the mouse,
the cursor should change to a 'move' type.
In Opera 7.01 the cursor type does not change at all.
In both IE 5.5 and Netscape 6.1 I either have to release
the mouse button, or move it (with the button still
clicked) in order to get the cursor to change. This does
not seem reasonable.
</BODY>
</HTML>