On the page that opens up your popup, have a function that knows whether
or not the page is opened, then close it if it is, every time.
Call this function to open your popup.
script language=JavaScript
var up;
up = false;
function windowopener(num) {
if
Uh.. Shouldn't this:
window.onload = showThisAlert();
Be:
window.onload = showThisAlert;
???
And window.open() by defaults searches the window name space for a
window with the name and return the object handle for that window. If it
fails, only then does it create a new window and return the
An (untested) idea:
In your calling window's javascript, check to see if the window is open. If
not, open it and let the onload handler run the function. If the window is
open, focus on it and run the function from the parent window.
--Ben Doom
Programmer General Lackey
Moonbow
Uh.. Shouldn't this:
window.onload = showThisAlert();
Be:
window.onload = showThisAlert;
Yea, it was before and then I goofed it up -- put it back, but that's not
what's causing the problem apparently...
I was getting an error in Netscape of arg has no properties
that's changed, it now
I remember now the big reason I didn't want to try to close the open window
from the parent window. If the user refreshes the parent window, the pointer
to the popup disappears, so if a user gets the popup, leaves it up, hits
another link, goes to another page, the function still exists, but the
Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 3:53 PM
To: CF-Talk
Subject: RE: javascript popup window
I remember now the big reason I didn't want to try to close the open
window
from the parent window. If the user refreshes the parent window
What would happen if you always tried to
close it, even before it is open?
How about closing it every time it loses focus?
There's a thought ... In the past if I tried to close a window that wasn't
open, I've just gotten js errors... the onblur() idea I hadn't thought of
and I may wind up
Woohoo!! I figured it out. :)
Instead of trying to set
mypopup.window.dialogArguments = myobject;
from the parent window the way I had been, to simulate the behavior of the
IE showModelessDialog() function, I set a variable as an attribute of the
parent window top and then reference that from
8 matches
Mail list logo