how to fire onbeforeunload event handler is not firing in chrome and firefox

Posted by Niharikap under JavaScript on 6/26/2014 | Points: 10 | Views : 9179 | Status : [Member] | Replies : 1
Hi,

While closing browser(IE/Chrome/FireFox) , I need to delete some files from virtual directory.
For that, I have added below event at client side to verify with all browsers and observed that IE is getting alert message wherein not working in Chorme/Firefox browsers.

window.onbeforeunload = function() {
alert("onbeforeunload");
}

How avoid this type of issue and let me know is there any alternate solution for this.




Responses

Posted by: Bandi on: 6/26/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
refer http://stackoverflow.com/questions/24081699/why-onbeforeunload-event-is-not-firing

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Niharikap, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response