Hi,
i have chat application.if user comes to my homepage and close his browser, that time my chat application has to open and shown in popup. not only close button and also in tab close on browser my chat apps has to open.
Show popup on browser close button
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Khargesh RajputRank #616 · 3.9K reputationPosted Mar 12, 2015, 12:14 AM EDT
Go below link to demo
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onbeforeunload