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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect window closing

Status
Not open for further replies.

fayna

Programmer
Jan 14, 2002
35
ES
hello,
i'd like to perform some actions when my window is closing or reloading, but I don't know how to detect these events, is there a way to do it?
thanks
 
well, to detect resizing just use window.onResize
I do not know how you can detect window closing. --------------------------------------------------
Goals are dreams with deadlines
 
wood,
don't those apply to the document? like, if a person goes to a new url in the same window, the onUnload will be fired?
I thought that she asks how to detect when the actual phisycal window is closed.
Hmm, may be I misundrestood. --------------------------------------------------
Goals are dreams with deadlines
 
thanks wood, thanks valeriav!
the method onunload works for me because i need to close a child window when its parent closes. i know the parameter 'dependent' for 'open' but it doesn't do anything and the child remains opened.
 
onunload works for changing pages and actually closing the window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top