Posted by: mrgierer | November 24, 2006

Firefox: Focusing popup windows

If you find the code snippet:

<body onload="self.focus()">

not work in Firefox 2, this is not a bug. Firefox has an advanced Javascript option called “Raise or lower windows” which is deactivated by default. You may find this option under:

  • Tools
  • Options…
  • Content tab
  • Advanced button next to “Enable JavaScript”

Firefox advanced javascripts options

Once enabled the above code will work again. But only on your Firefox. So you might want to rethink if that popup stuff is really what your users want ;-)


Responses

  1. Nice!


Leave a response

Your response:

Categories