Re: setting cursor to wait document-wide
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: setting cursor to wait document-wide

From: BootNic <Bootnic@bounce.prodigy.net>
Date: Tue Jan 31 2006 - 20:02:08 CET

> "PJ6" <nobody@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*
Received on Tue Feb 7 21:29:05 2006