javascript thread: alert when opened window finishes.
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1F121.73CE79A0
Content-Type: text/plain;
charset="iso-8859-1"
This is a function on my parent window that opens up a calendar, and when
the user clicks a date, data gets passed back to a form on the parent
window, and the pop-up window closes:
Function on parent window:
function GetDate(field)
{
var win = open('../calendar/calendar.asp?field=' +
field,'','toolbar=no,location=no,directories=no,status=no,scrollbars=no,widt
h=175,height=175,top=300,left=400')
}
Here is another function on the parent window to handle your alert:
function ChildAlert()
{
alert("You have closed a child window")
}
on the child window, do whatever you need to do, and use the onUnload event:
<body onUnload="top.window.opener.ChildAlert();">
When your child window gets closed by the user, the function ChildAlert() on
your parent window will get called.
-------------------------------------------
Jason A. Greenfeld
Lead Software Developer
Unitek Technical Services
xxx-xxx-xxxx x3024
-----Original Message-----
From: Jerry Diegel [mailto:diegelj@g...]
Sent: Wednesday, May 01, 2002 10:48 AM
To: javascript
Subject: [javascript] alert when opened window finishes.
From one page I have a link that opens a new window with a survey. The user
fills out the survey, hit's submit and the information is emailed to an
individual in the company. After that, the new window closes itself. What
I would like to do is have my parent window recognize that new window was
closed and alert() the user that their information was submitted. Any
suggestions?
Thanks,
Jerry
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20