View Full Version : Why doesn't this pop-up script work in Firefox?

06-23-2008, 07:55 PM
Would someone be kind enough take a look at this script and tell me why it doesn't work in Firefox3 or FF2 (under Mac OS X 10.4.11).

It's a simple new window script (I want a "bare" window without tool/scrollbars etc). It works OK in Explorer and Safari. I've made sure "Java" and "Javascript" are switched ON in FF prefs. It doesn't work whether popups are blocked or not...

<script type="text/javascript">
var newwindow;
function workexample(url)
if (window.focus) {newwindow.focus()}

my links look like this...

<a href="javascript:workexample('agent.jpg');" target="example"
onmouseover="changeImages('examples_01', 'examples_01-over.jpg'); return true;"
onmouseout="changeImages('examples_01', 'examples_01.jpg'); return true;">
<img name="examples_01" src="examples_01.jpg" border="0"></a>

Please be gentle with me - I'm a Javirgin!

Many thanks,

08-08-2008, 07:25 PM
Besides Javascript is marked as "ON" in the Firefox Preferences, you must check in the very same preferences window the button for advance configuration (that button appears to right of the checkbox that activates Javascript).

In the second option that appears in the advance configuration, the one about focus and hide/blur windows, must be checked.

I had that very problem few minutes ago (same ff version), and reading your question I came to that configuration window. My problem now is solved. Sometimes a question can lead to a solution, so thank you. :thumbsup: