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

popup when browser closes but NOT when browing to another page

Status
Not open for further replies.

pr0fess0r

Programmer
Jul 10, 2001
25
NZ
Hi

How can I have an event fire off (i.e. a popup) when a user closes their browser or clicks an offsite link, but not when they submit a form or follow a link on the page.
I have an "edit article" page where a user updates details in a form. During this time the article is locked. If the user browses any other page on my site the article will be unlocked, but if they follow an external link or close the browser it isnt, so I want to have a popup for that situation that does the unlock (ie some php code). Is this possible?

cheers
 
check out
thread216-540484

jeff uses window.bOK variable to do so. However, things go out of control when you hit forward/back buttons.

chicken or egg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top