Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set the mouse cursor to wait while processing?

Status
Not open for further replies.

Maim

Programmer
Jun 25, 1999
106
CA
I have my document with lots of controls and I'd like to have the cursor use the 'wait' style but I've not found any way to have it like this for everything in the page.

I can always set anything to use the following while processing something
object.style.cursor = 'wait';
then when finished
object.style.cursor = 'default';

but even if my object = document.body; if the cursor is over anything else, it'll go back to default until there's nothing over the body.

Any ideas?

-----------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook
 
Might be a bit 'ouchy' in the time department if you have a big page but:
[tt]function doWait(){
for(i=0; i < document.all.length; i++){
document.all.style.cursor = 'wait';
}
}
function endWait(){
for(i=0; i < document.all.length; i++){
document.all.style.cursor = 'default';
}
}[/tt]

should be effective.
 
Yeah, I'd considered this but if there are a couple hundred controls on the page (huge lists), it'd take forever to run through them (ok maybe not forever).

Anyway, this isn't a big deal, just would be nice to have ;)

-----------------------------------
&quot;Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.&quot; - Rich Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top