Solved

document.body.style.cursor='wait'; does not work for me!

Posted on 2009-04-07
9
2,503 Views
Last Modified: 2012-08-13
Hi, I used IE and FF but document.body.style.cursor='wait'; does not work, any suggestion?
0
Comment
Question by:Abdu_Allah
  • 4
  • 4
9 Comments
 
LVL 23

Expert Comment

by:apresto
ID: 24087198
Where are you calling this line? In a script or the event of a control?
0
 
LVL 11

Expert Comment

by:MacAnthony
ID: 24087221
You are going to have to give a little more context as to what is happening. Also any elements like text boxes or links and other elements that have custom hover styles over them will still change them to their respective style.
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24087410
I call it in a script.
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24087420
I mean I call it in a function withing a JS script file and in the page I call that function.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 23

Expert Comment

by:apresto
ID: 24087471
And you're sure that the code is being executed, put an alert("Test"); before the line is called, and see if it appears, you may have other js errors stopping it from executing
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24088154
Yes I'm sure and I did  alert("Test");
0
 
LVL 23

Accepted Solution

by:
apresto earned 250 total points
ID: 24088609
try putting a little delay:
setTimeout("document.body.style.cursor = 'wait'", 10);
see if that helps
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24089239
That works but why?
0
 
LVL 23

Expert Comment

by:apresto
ID: 24103193
sorry for the delay.
Honestly...i dont know, maybe its because it is giving the command a chance to execute before it performs anything else. The reason i suggested it is because it has helped me for similar things in the past
Glad i could help
Apresto
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now