469,934 Members | 2,704 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Change of mouse pointer is only visible if I move the mouse

With the following code I can change the mouse pointer. However, if you
click in Mozilla (with IE it works perfect) on 'Show hourglass' the mouse
pointer changes only if you move the mouse at least on pixel.

<html>
<body>
<script type = 'text/javascript'>
function show_hourglass() {
document.getElementById("my_href1").style.cursor = "wait";
document.getElementById("my_href2").style.cursor = "wait";
}

function show_hand() {
document.getElementById("my_href1").style.cursor = "default";
document.getElementById("my_href2").style.cursor = "default";
}
</script>

<a href = "javascript:show_hourglass();" id = "my_href1">Show
hourglass</a>
<br>
<a href = "javascript:show_hand();" id = "my_href2">Show hand</a>
</body>
</html>

Is there any workaround? E.g. to move the mouse one pixel by javascript?
Stefan
Jan 28 '06 #1
1 3820
On 2006-01-28, Stefan Mueller <se**************@yahoo.com> wrote:
With the following code I can change the mouse pointer. However, if you
click in Mozilla (with IE it works perfect) on 'Show hourglass' the mouse
pointer changes only if you move the mouse at least on pixel.


I get a wristwatch instead of an hourglass :)

clicking show hand gives me the arrow instead of the usual hand when
pointing at the links. using "" instead of "default" fixes that.

I'm guessing you need to generate a mouse-moved event, I'm not sur how to do
that.

--

Bye.
Jasen
Jan 29 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by lauren quantrell | last post: by
3 posts views Thread by AinO | last post: by
19 posts views Thread by wmanzo | last post: by
1 post views Thread by Narcolessico | last post: by
6 posts views Thread by c.k. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.