Click to See Complete Forum and Search --> : How to show a hourglass mouse icon


Caliban
10-31-2003, 05:12 PM
Hi y'all JS gurues :)

I'm trying to change the mouse icon while a task is processing (in order for the user to know that the process is "working"...) but the task begins and ends ... and the mouse icon is not changing.

Is there anyway to "synchronize" the two events? (changing the mouse icon and performing the task) so when the task begins, to change mouse icon from "default" to "hourglass"; and when the task ends, to change mouse icon from "hourglass" to "default".

If you have a li'l sample code about this issue, pls be kind and share it with me.

Thanx in advance.

fredmv
10-31-2003, 05:19 PM
I believe this is IE-only, but this is what you're looking for:<body style="cursor: wait;">I hope that helps you out.

yphasukyued
11-26-2003, 08:20 AM
How to change it back to default after the page was loaded?

Pittimann
11-26-2003, 09:23 AM
Hi!

I'm also quite sure, that this works for IE only.

To change it back using fredmv's example, use this:
<body style="cursor: wait;" onload="document.body.style.cursor='default';">

Cheers - Pit

fredmv
11-26-2003, 09:54 AM
Or:<body style="cursor: wait;" onload="style='cursor: default';">

yphasukyued
03-03-2004, 12:54 PM
I have to get rid of ";" and the it worked.
Original code:
style="cursor: wait;" onload="document.body.style.cursor='default';">

Changed to:
<BODY style="cursor: wait" onload="document.body.style.cursor='default'">

Is any way we can put customize animate gif instead of HOUR GLASS?

Thanks

Yut

AdamGundry
03-03-2004, 03:12 PM
I'm not sure if you can use GIFs, or whether you need to use CUR files - try it and see (this will first try to load myCursor.gif, then noGifCursor.cur, and if that fails use the hourglass):

style="cursor: url(myCursor.gif), url(noGifCursor.cur), wait"

See the CSS specification (http://www.w3.org/TR/CSS2/ui.html#propdef-cursor).

Adam

P.S. This is not IE-only, it should work in any CSS2-compliant browser.

yphasukyued
03-04-2004, 07:12 AM
Thanks AdamGundry, I will try it.

Yut