Re: Javascript \"on load\"

by "Rossi Designs" <webmaster(at)rossidesigns.net>

 Date:  Sun, 20 Feb 2000 23:16:50 -0500
 To:  "Shannon Doyle" <shannon(at)oztek.net.au>,
<hwg-techniques(at)hwg.org>
 References:  net webctr net2
  todo: View Thread, Original
add self.close() to the last line of the code in the pop-up that opens the
new page in the parent. The child needs to close itself.

Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: Shannon Doyle <shannon(at)oztek.net.au>
To: <hwg-techniques(at)hwg.org>
Sent: Sunday, February 20, 2000 7:43 PM
Subject: Re: Javascript \"on load\"


| Hi Listers,
|
| Well I have tried this and I still cant get it to work. On the page that I
am
| trying to close the popup window I keep getting a javascript error of
'Orders is
| not defined' the code tha I am using is listed below
|
| On the page that calls up the popup window:
|
| <script language="Javascript">
| <!--
| function open_credit(OrderNumber,Total_charge,FruitCookie,Email){
|
|
winStats='toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,st
atus=yes,resizable=no,copyhistory=no,width=450,height=450';
|
|  url="www.domain.com/file.php3?variable='+ Variable + 'variable2='
+Variable2;
|  Orders=window.open(url,"Orders",winStats);
|   Orders.focus();
| }
|
| then on a click it just calls that function.
javascript:open_credit(variable
| listed in here)
|
|
| Now on the popup window, it changes the parent(main browser window) to
another
| page and on that particular page I want to close the popup window. This is
where
| I get the javascript error
|
| I am using the following to try and close the popup
|
| <body bgcolor="#FFFFFF" onload=javascript:Orders.close>
|
| Any help as to how to get rid of the javascript error, and actually get
the
| popup to close would be appreciated.
|
| Thanks
| Shannon
|
| Darrell King wrote:
|
| > Give it a name when you open it...NewWindow=open(etc...)...and use that
name
| > to refer to the window object: NewWindow.close().
| >
| > D
| >
| > ----- Original Message -----
| >
| > > I am wondering if there is any way that you can close a
| > > popup window from another page.
| > >
| > > I have a popup window that once it is finished with, you
| > > click on a button and it loads a page in the main window
| > > underneath, but I need the popup window to close once
| > > the page underneath has loaded.
|
|

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA