[Javascript] window.open() not working in onLoad() of Mozilla 1.5

Chris T christ at saeweb.com
Mon May 3 08:28:01 CDT 2004


> First off, the onLoad function documentation rather explicitly states that
> the first parameter is an HTML file name, or a pointer to a file (with
> whatever extension) that encapsulates an HTML page.

I think you're talking about the window.open() method. onLoad can be
anything.

> The other thing I found problematic is the "location=no" declaration.  In
> some of my tests this caused difficulties in the onLoad, but only for some
> browsers with certain revision/version combinations.  Go figure.
>
> If I were you, I'd sneak up on it.  Start by changing the onLoad to simply
> launch an alert, i.e;
>
> <body onLoad='javascript:alert("howdy, yall!");'>


There's no need to do any of this. It is certainly a Pop-Up Blocker issue.
We run into it frequently. The pop-up triggering event HAS to be triggered
by the user. It can't automatically be generated or else your pop-up
blocking software will stop it. Some even block pop-ups that ARE triggered
by the user.

Unfortunately, this is a side-effect of unscrupulous webmasters. They ruined
a possible good thing.

Chris Tifer
http://emailajoke.com




More information about the Javascript mailing list