$(window).unload(function() {
//redirection code here
alert('your message');
});
So after some research, I made it and solved the issue with following. I hope this will help you as well.
$(window).unload(function(event) {
if (event.target.readyState=='complete') {
alert('Closing Window and redirecting...');
var opener = window.dialogArguments;
opener.parent.location = '../YourRedirected.aspx?id=<%=Record_ID %>';
top.window.close();
}
else {
alert('Reloading Window');
}
});
No comments:
Post a Comment