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!

how can I perform any action on browser window close 1

Status
Not open for further replies.

haroonkhalid

Programmer
Nov 6, 2001
16
SG
hi all ...
i m trying to perform any action on HTML document when browser is closed either from X sign on right top or from file menue, file -> close. there is one option that i override onUnLoad mothod but it is fired on every referesh and redirection as well.
I want my function to be executed only on broswer window closed.

c ya
 
In the <body> tag use onUnload.

<body onUnload=&quot;yourFunction();&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top