473,378 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

global cursor change

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

Jul 23 '05 #1
6 6656
Vincent van Beveren wrote:
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='wa it';">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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 23 '05 #2
DU
Vincent van Beveren wrote:
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
Jul 23 '05 #3
> 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.

Jul 23 '05 #4
On Wed, 16 Jun 2004 17:23:00 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:
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.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #5
Jim Ley wrote:
On Wed, 16 Jun 2004 17:23:00 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:
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.


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 <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html
Jul 23 '05 #6
On Mon, 21 Jun 2004 20:34:00 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:
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.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
1
by: Tee | last post by:
Hi, From my main form, I am executing another application using System.Diagnostics.Process.Start. The application has its own window displaying when the applicaiton is run. I want to change...
6
by: Soha | last post by:
I'm a beginner in using javascript and i need a reply so urgent; i have a problem in using javascript with asp the problem is that i want to define a global variable and then change the value of it...
1
by: Paul Steele | last post by:
Is there any way in C#/.NET to determine what the current global cursor is being displayed? The .Net method Cursor.Current only applies to the running application. I want to access the cursor even...
5
by: Lespaul36 | last post by:
I have a mdi app. I need to change the cursor when I click on certain button on a form that I made into a toolbar. I tried to use cursor.current. But the cursor won't show. if I change the form...
2
by: Jim Frazer | last post by:
Hi, I'm working on an application in C# that will allow the user to create simple CAD drawings on a CEPC system. I would like to be able to change the cursor shape depending on the drawing mode...
2
by: Florian Lindner | last post by:
Hello, I have a little problem with the global statement. def executeSQL(sql, *args): try: import pdb; pdb.set_trace() cursor = db.cursor() # db is <type 'NoneType'>. except: print...
3
by: barronmo | last post by:
I'm getting an error msg I don't understand, "global name EMR_globals is not defined", and could use some help. I've separated the application I'm building into several modules. One of the...
4
by: datvong | last post by:
IE does not change the cursor immediately after a style.cursor is set. In the following sample, I have 2 divs, one inside another. The inner has a cursor of crosshair, outer a hand. If I click...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.