Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XMLHTTP and Hourglass Cursor

Posted on 2001-07-07
5
Medium Priority
?
553 Views
Last Modified: 2008-03-10
Ok, Basically upon an onClick, in a javascript function I do:

document.body.style.cursor = "wait";
<some long xmlhttp post which takes 5 seconds or so>
document.body.style.cursor = "auto";

The problem is the cursor doesn't change to an hourglass fast enough. The XMLHTTP post is already executing way before it has a chance to change.
I read somewhere that the user has to move the mouse in order for it to change.
Well since the odds of a mouse move in the SPLIT SECOND between the change and the xmlhttp post begin is low, I need a faster method of changing the cursor.

Putting in a delay is out of the question.
Doesn't the XMLHTTP object have any sort of built in hourglass ability?
Are you able to move the cursor with javascript? I wouldn't mind moving it a pixel somewhere to see if that will change it to the hourglass right away (I'd rather not but, if thats what needs to be done)

Any ideas?
0
Comment
Question by:Sembiance
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:mattyk
ID: 6262450
Yes unfortunatly you will usually need to move the mouse to trigger the cursor to change.  However another solution I have found is to blur and then focus back on the window object.  A quick example would be:

<body>
<script>
function testing()
{
     document.body.style.cursor = 'wait'
     window.blur();
     window.focus();

}

</script>
<a onclick="testing()">Test Link</a>

</body>

-matty
0
 

Author Comment

by:Sembiance
ID: 6262874
Sigh... I tried that and it didn't work.
All that happens now is almost the entire webpage disappears while the request takes place and then reappears after its done.

By the way  90% of the webpage is dynamically retrieved via XMLHTTP objects and so not much stays on the screen during a blur/focus.

What else can I do?
0
 
LVL 5

Accepted Solution

by:
mattyk earned 400 total points
ID: 6262921
Would you be open to using a small pop window that opens when the loading starts and then closes once things are done?
0
 

Author Comment

by:Sembiance
ID: 6273337
Not really. Anything visually noticable is not an option. I really need it to be seamless.

But maybe its not just possible.

I know I don't want to introduce an insecure active-x control just to allow the cursor to change.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6867168
Finalized by EE Moderator
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

618 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