global cursor change

  • Thread starter Vincent van Beveren
  • Start date
V

Vincent van Beveren

Hi everyone,

For an webapp I'm writing I want to set the cursor on 'wait' globally on
the page entire. In IE 6 I can do this by

document.body.style.cursor='wait';

However, Netscape 7 just seems to ignore that. Any ideas how I can make
it work for both browsers?

Thanks,
Vincent
 
G

Grant Wagner

Vincent said:
Hi everyone,

For an webapp I'm writing I want to set the cursor on 'wait' globally on
the page entire. In IE 6 I can do this by

document.body.style.cursor='wait';

However, Netscape 7 just seems to ignore that. Any ideas how I can make
it work for both browsers?

Thanks,
Vincent

<a href="#"
onclick="document.documentElement.style.cursor='wait';">Test</a>

document.documentElement.style.cursor = 'wait'; works in IE, Firefox 0.9,
Mozilla 1.6 and Opera 7.51. It should work in Netscape 7.01, but Netscape 7
is based on a much earlier version of Mozilla, so it may contain bugs which
keep it from correctly honoring the above.

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 
D

DU

Vincent said:
Hi everyone,

For an webapp I'm writing I want to set the cursor on 'wait' globally on
the page entire. In IE 6 I can do this by

document.body.style.cursor='wait';

However, Netscape 7 just seems to ignore that. Any ideas how I can make
it work for both browsers?

Thanks,
Vincent

FWIW,
document.body.style.cursor='wait';
works for me in NS 6.2 and I would be surprised if it was not working in
NS 7.x

DU
 
V

Vincent van Beveren

For an webapp I'm writing I want to set the cursor on 'wait' globally on
the page entire. In IE 6 I can do this by

document.body.style.cursor='wait';

However, Netscape 7 just seems to ignore that. Any ideas how I can make
it work for both browsers?

I found out, that it does work,however, it only works for all elements
on the page. So, if I put some text in the body, and I move my cursor
on the text, it does give a wait-cursor. But that is not exactly what
I am looking for. Thanks everyone for giving it a try.
 
J

Jim Ley

document.documentElement.style.cursor = 'wait'; works in IE, Firefox 0.9,
Mozilla 1.6 and Opera 7.51.

What happens with elements with a specific cursor set? they would
still be honoured wouldn't they?

Jim.
 
G

Grant Wagner

Jim said:
What happens with elements with a specific cursor set? they would
still be honoured wouldn't they?

Jim.

Actually, now that I examine the behaviour a little more closely, although it
does the same thing across all browsers, what it does is set the cursor for
the documentElement, not any of the child elements on document.body, which is
probably not the desired outcome.

Ultimately, if the OP's requirements are to set the wait cursor on all
elements, then the only way to be sure you've done that is to navigate through
the entire DOM hierarchy setting .style.cursor = 'wait'; on all elements.

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 
J

Jim Ley

Ultimately, if the OP's requirements are to set the wait cursor on all
elements, then the only way to be sure you've done that is to navigate through
the entire DOM hierarchy setting .style.cursor = 'wait'; on all elements.

add an onmousemove event which changes the cursor to WAIT and pushes
the element onto a stack, and when you want to go back, reset all the
elements in the stack, should be better performance than iterating
over them all.

Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,153
Latest member
NamKaufman
Top