By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

setting cursor to wait document-wide

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
> "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 discussion thread is closed

Replies have been disabled for this discussion.