onLoad="this.focus();"

D

dE|_

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|_---
 
J

Joost Diepenmaat

dE|_ said:
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.
 
D

dE|_

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|_---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,248
Latest member
MagdalenaB

Latest Threads

Top