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

Mike Dougherty mdougherty at pbp.com
Tue May 4 08:01:43 CDT 2004


How difficult would it be to populate a 
<div id='popscreen' style='display: none; z-index:100; position:absolute; top:X; left:Y;'> 
with the contents of your popup, then in some other object:
onClick="document.getElementById('popscreen').style.display='inline'; "

I've never used a real window.open(ing) popup, because this strategy keeps the content in the 
document and allows direct references to the "parent" document (because the 'popup' is actually 
part of the DOM tree)

What do you [all] think of this plan?

On Mon, 3 May 2004 09:28:01 -0400
  "Chris T" <christ at saeweb.com> wrote:
>
>> 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
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list