Solved

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

Posted on 2009-04-07
9
2,516 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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
 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

816 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

10 Experts available now in Live!

Get 1:1 Help Now