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: Evertjan. <exjxw.hannivoort@interxnl.net>
Date: Tue Jan 31 2006 - 17:02:25 CET

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)
Received on Tue Feb 7 21:28:53 2006