I have a page that has a exit page confirmation box which is this code
<script>
window.onbeforeunload = function() {
return 'You have unsaved changes!';
}
</script>
Now, i want to add a redirection. For example i close the page, a confirmation box will appear that has a Leave and Cancel button. When Cancel is clicked it will redirect to a page. Then, when Leave button is click a page will just close.
Please Help..