From: PJ6 on
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


From: jshanman on
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.

From: Evertjan. on
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)
From: PJ6 on
"jshanman" <jcshanks(a)sbcglobal.net> wrote in message
news:1138722903.326283.5450(a)g43g2000cwa.googlegroups.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


From: BootNic on
> "PJ6" <nobody(a)nowhere.net> wrote:
> news:guLDf.5270$J81.2746(a)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*