Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Fri, 01 Feb 2008 13:21:11 GMT,    group: uk.net.web.authoring        back       
onLoad="this.focus();"   
A while ago I was given this syntax for repeated onClick popups to come to 
the front of the screen;

<body onLoad="this.focus();">

Today I find it does not work in FireFox. What's going on please?

---dE|_---
date: Fri, 01 Feb 2008 13:21:11 GMT   author:   dE|_

Re: onLoad="this.focus();"   
"dE|_"  writes:

> A while ago I was given this syntax for repeated onClick popups to come to 
> the front of the screen;
>
> <body onLoad="this.focus();">
>
> Today I find it does not work in FireFox. What's going on please?

You should use window.focus() - there is no document.focus() in the
Gecko DOM.

Note that firefox allows you to disable raising and lowering windows in
the enable javascript -> advanced... tab, and sensible users have that
option checked.

Joost.
date: Fri, 01 Feb 2008 14:57:33 +0100   author:   Joost Diepenmaat

Re: onLoad="this.focus();"   
"Joost Diepenmaat" wrote in message
>> A while ago I was given this syntax for repeated onClick popups to come 
>> to
>> the front of the screen;
>>
>> <body onLoad="this.focus();">
>>
>> Today I find it does not work in FireFox. What's going on please?
>
> You should use window.focus() - there is no document.focus() in the
> Gecko DOM.

Thanks

> Note that firefox allows you to disable raising and lowering windows in
> the enable javascript -> advanced... tab, and sensible users have that
> option checked.

It's not a big issue here but that is noted, along with everything else that 
can be disabled from JavaScript as a whole, to a lack of speakers, to a 
blind member of public.

---dE|_---
date: Fri, 01 Feb 2008 14:37:27 GMT   author:   dE|_

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us