Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to open a browser window with all the features when some one close the browser or tab.

below is my code :
JavaScript
function ConfirmClose() {
    var params = ['height=' + screen.height, 'width=' + screen.width].join(',');
    var popup = window.open("Home.aspx", 'popup_window', params);
    popup.moveTo(0, 0);
}

window.onbeforeunload = ConfirmClose;
$(document).ready(function () {
    $('a[rel!=ext]').click(function () { window.onbeforeunload = null; });
    $('form').submit(function () { window.onbeforeunload = null; });
});

the new browser is opened but without back and forward and no status bar etc.

any help would be appreciated.
Posted
Updated 22-Dec-15 2:25am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900