Tuesday, 27 August 2013

Get the exit value from the browser unload event ?

Get the exit value from the browser unload event ?

$(window).on("beforeunload", function(){
window.open("survey.html");
return "Are you sure you want to leave?";
});
Once user try to exit from the web page this will ask "Are you sure you
want to leave?"
Is there a way to know whether the user click yes or not from this popup ?

No comments:

Post a Comment