9/22/2011 5:20:10 AM
Title:
Browser close event is not working in Mozilla fire fox
Hi All,
I have a button in my application, if i click the button the browser should automatically close, but my code is working only, IE, Chrome and Opera but its not working in mozilla
But if i am connecting to locally its working in mozilla, but if i move to the server its not working.
Please check the below code , is there modifications, Can any body please help me, its very urgent,
//to close the Browser
function closeBrowser()
{
// Internet Explorer
if (navigator.appName.indexOf("Microsoft")!=-1)
{
window.close();
return;
}
else if(navigator.userAgent.indexOf("Firefox")!=-1)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
window.open('','_self', '');
window.close();
}else
{
// Other Browsers
window.open('','_self', '');
window.close();
}
}
Thanks & Regards,
krishna