Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript function to trap when a normal window gets closed

Status
Not open for further replies.

kgomotso

Programmer
Oct 31, 2000
20
ZA
I need to know if there is a onwindow.close() (or something like that) function that I can use coz I need to perform some function when the user closes the window
 
no idea if there's an onwindow.close() event to trap it , I doubt it exists. But you can however check the existance of the window and if it doesn't execute the funtion.
function checkPop() {
if (popup && !popup.closed) {

}
else {

}
}
setInterval("checkPop()",1000);

popup being the name you gave to the popup window ofcourse.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top