By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.