i want to open new window if user close the browser or tab and it is working with window.open() method but that is not i want.
i want to open using request.Open() below is my
var inFormOrLink;
$('a').live('click', function () { inFormOrLink = true; });
$('form').bind('submit', function () { inFormOrLink =
$(window).bind('beforeunload', function (eventObject) {
var returnValue = undefined;
if (!inFormOrLink) {
var params = ['height=' + screen.height, 'width=' + screen.width + ',toolbar=yes, location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes'].join(',');
var popup = window.open("Logout.aspx", '_blank', params);
popup.moveTo(0, 0);
var request = GetRequest();
request.open("GET", "../Logout.aspx", true);
request.send();
}
eventObject.returnValue = returnValue;
return returnValue;
});
don't know what is wrong with it.
any help would be appreciated.