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 Software

: -----Original Message-----
: From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, December 19, 2002 2:33 PM
: To: CF-Talk
: Subject: OT: javascript popup window
:
:
: I'm working with a named popup window ( and yes, I know ) ... so if the
: popup is still open and it's opened a second time, it doesn't open another
: window, it just reuses the existing window. The problem I'm having is that
: in Netscape, I can't seem to get the onload event to fire when
: the window is
: reopened. If I close the popup first, it works fine. If I leave the popup
: open and it opens a second time, I can't get it to display the
: popup info or
: come to the front. I have this script on the popup page:
:
: <script language="JavaScript" type="text/javascript">
:       function showThisAlert() {
:               var arg = window.dialogArguments;
:
:               arg.message = arg.message.replace("PRE>","P>");
:               setHTML("alertBody",arg.message);
:
:               document.getElementById("ok").onclick = (typeof
: arg.onok == "string")? new
: Function(arg.onok) : arg.onok ;
:               if (arg.oncancel != null) {
:                       document.getElementById("cancel").onclick =
: (typeof arg.oncancel ==
: "string")? new Function(arg.oncancel) : arg.oncancel ;
:
: document.getElementById("cancel").style.display = "inline";
:               }
:       }
:       window.onload = showThisAlert();
:       window.onfocus = showThisAlert;
:       window.focus();
: </script>
:
: window.dialogArguments; is set by the js function that calls the popup
: window like this:
:
: mypopup = window.open(...);
: mypopup.dialogArguments = myargumentsobject;
:
: Like I say, it works beautifully the first time the popup is opened.
:
: Anybody have any ideas?
:
: s. isaac dealey                954-776-0046
:
: new epoch                      http://www.turnkey.to
:
: lead architect, tapestry cms   http://products.turnkey.to
:
: certified advanced coldfusion 5 developer
: http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
:
:
: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to