473,403 Members | 2,183 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,403 software developers and data experts.

setting cursor to wait document-wide

PJ6
This is the only solution I've found to get a wait cursor document-wide:

function Busy()
{
if (document.all) for (var i=0;i < document.all.length; i++)
document.all(i).style.cursor = 'wait';
}

Sadly, for pages with a lot of elements, its performance is not acceptable.

Any ideas?

TIA,
Paul
Jan 31 '06 #1
4 18487
PJ6 wrote:
This is the only solution I've found to get a wait cursor document-wide:

function Busy()
{
if (document.all) for (var i=0;i < document.all.length; i++)
document.all(i).style.cursor = 'wait';
}

Sadly, for pages with a lot of elements, its performance is not acceptable.

Any ideas?

TIA,
Paul


personally, If a website told me to wait with a "wait" cursor, it would
annoy me. Why not just have an animated message somewhere in the
middle of the screen that says "Processing..." or something. Include a
cancel button that returns to your application if it may take more then
5-10 seconds.

Jan 31 '06 #2
PJ6 wrote on 31 jan 2006 in comp.lang.javascript:
This is the only solution I've found to get a wait cursor
document-wide:

function Busy()
{
if (document.all) for (var i=0;i < document.all.length; i++)
document.all(i).style.cursor = 'wait';
}

Sadly, for pages with a lot of elements, its performance is not
acceptable.

function Busy(){

document.body.style.cursor='wait'

zz = document.getElementsByTagName('A')
for (var i=0;i < zz.length; i++)
zz[i].style.cursor='wait'

zz = document.getElementsByTagName('INPUT')
for (var i=0;i < zz.length; i++)
zz[i].style.cursor='wait'

}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 31 '06 #3
PJ6
"jshanman" <jc******@sbcglobal.net> wrote in message
news:11********************@g43g2000cwa.googlegrou ps.com...
personally, If a website told me to wait with a "wait" cursor, it would
annoy me. Why not just have an animated message somewhere in the
middle of the screen that says "Processing..." or something. Include a
cancel button that returns to your application if it may take more then
5-10 seconds.


OK, but one of the operations I want to show a wait state for is page
redirection. AJAX calls such as updating data are very fast, but new page
requests (which may or may not come from back from an AJAX request) are
relatively slow. When I update the page to show a wait state element before
it redirects, I now have that element visible when the user navigates
backward, which is about as acceptable as preventing backwards navigation in
the first place.

I know some people are just going to point out that this post shows that I
obviously don't know what I'm doing; yes, I'm still relatively new at this
but please cut me a little slack (not you, jshanman). My goal is to give the
user a "fast" response to say immediately "yes I'm doing something" on any
action, regardless of how long the server takes. I think it will really
improve user perception of the application's responsiveness. Since I have a
library of controls, the more globally I approach this problem the better.

Paul
Jan 31 '06 #4
> "PJ6" <no****@nowhere.net> wrote:
news:guLDf.5270$J81.2746@trndny01....

This is the only solution I've found to get a wait cursor
document-wide:

function Busy()
{
if (document.all) for (var i=0;i < document.all.length; i++)
document.all(i).style.cursor = 'wait';
}

Sadly, for pages with a lot of elements, its performance is not
acceptable.

Any ideas?


<script type="text/javascript">
function Busy(){
document.body.className=(document.body.className== 'wait')?'':'wait';
}
</script>
<style type="text/css">
..wait,.wait *{
cursor: wait;
color:#F5F5F5;
background-color:#FFC0CB;
}
</style>

--
BootNic Tuesday, January 31, 2006 2:01 PM

The world is very different now. For man holds in his mortal hands the power to abolish all forms of human poverty, and all forms of human life.
*John Fitzgerald Kennedy, Inaugural Address*

Jan 31 '06 #5

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

Similar topics

1
by: Yaron Cohen | last post by:
Hi, I would like to ask for your help (I am using only IE5.5). I have a very big table that I would like to sort. During the sort I would like the cursor changed to 'wait' state and back to...
2
by: Simon Wigzell | last post by:
How can I set a busy cursor for my whole page rather than just for a link? My page calls another page with form arguments that does some processing then changes the values on the calling page. It...
2
by: malbanese | last post by:
I am building an ASP.Net application that occasionaly "stalls" while running a server side process like a large database update. During this tine the user does not get any feedback as to what is...
4
by: Jim Mitchell | last post by:
I have a web page that I show using show ModalDialog. The web page takes about 6 seconds to load. No matter what I try, I can not get the cursor to show a "WAIT" until the page is loaded in...
6
by: Vincent van Beveren | last post by:
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...
1
by: Brami Yair | last post by:
Hi, below is example js: function SomeLongProcess() { for(var i=0;i<document.all.length;i++) document.all(i).style.cursor="wait"; // some long process here !!
6
by: Tomek | last post by:
In my page I reload JavaScript. When it is reloading the cursor change to "wait" (hourglass). After javascript loaded it does not change back to the "hand" if cursor stay on hyperlinks. How can I...
12
by: info | last post by:
Hi All, I am trying to set the hourglass cursor inside a class that has nothing to do with MainForm class and I don't want to pass a reference to MainForm. How can I set the current cursor to...
2
by: Aaron Gray | last post by:
Hi, I am doing some JavaScript calculations that can take up to one minute and wanted an hour glass cursor to appear. The following is not however working on IE 6 or 7 ...
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: 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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.