NetRock6
asked on
IE prevents Window.close()
Hi ..
After running a script the below IE11 pops out the below message:
"Display Mixed Content"
"unchecked "Enable protected mode"
But none help so far. Does anyone know what option i need to change to prevent the popup.
Your Quick Prompts Highly Appreciated.
Thanks.
After running a script the below IE11 pops out the below message:
The web page you are viewing is trying to close the window. Do you want to close this window? Yes|NoI tried different settings in the security tab like:
"Display Mixed Content"
"unchecked "Enable protected mode"
But none help so far. Does anyone know what option i need to change to prevent the popup.
Your Quick Prompts Highly Appreciated.
Thanks.
Hi NetRock6,
Your script didn't make it. Please update the question with it.
Regards,
Chinmay.
Your script didn't make it. Please update the question with it.
Regards,
Chinmay.
Check those posts :
https://www.experts-exchange.com/questions/27062051/The-webpage-you-are-viewing-is-trying-to-close-the-window.html
https://stackoverflow.com/questions/17300705/ie-stop-message-the-web-page-you-are-viewing-is-trying-to-close-the-tab
https://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/ie9-how-do-i-disable-the-ie-popup-the-webpage-you/0451d034-90d7-4de9-8757-a00b24e55b82?page=2
https://stackoverflow.com/questions/601465/the-webpage-you-are-viewing-is-trying-to-close-this-window-warning-in-internet-e
https://www.experts-exchange.com/questions/27062051/The-webpage-you-are-viewing-is-trying-to-close-the-window.html
https://stackoverflow.com/questions/17300705/ie-stop-message-the-web-page-you-are-viewing-is-trying-to-close-the-tab
https://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/ie9-how-do-i-disable-the-ie-popup-the-webpage-you/0451d034-90d7-4de9-8757-a00b24e55b82?page=2
https://stackoverflow.com/questions/601465/the-webpage-you-are-viewing-is-trying-to-close-this-window-warning-in-internet-e
This one seems target the same version as yours IE 11 :
https://answers.microsoft.com/en-us/ie/forum/all/problem-on-internet-explorer-11-says-the-webpage/0a44ff8c-ffa2-4ee5-87b6-b33fdb7a8aae
https://answers.microsoft.com/en-us/ie/forum/all/problem-on-internet-explorer-11-says-the-webpage/0a44ff8c-ffa2-4ee5-87b6-b33fdb7a8aae
Nothing to do by changing the settings.
Use this:
function quitBox(cmd)
{
if (cmd=='quit')
{
open(location, '_self').close();
}
return false;
}
Use this:
function quitBox(cmd)
{
if (cmd=='quit')
{
open(location, '_self').close();
}
return false;
}
The attached works for IE and Edge (but not Firefox and Chrome).
If you have other code that works for those browsers, maybe you can do a browser sniff and branch as needed.
closeWindow.html
If you have other code that works for those browsers, maybe you can do a browser sniff and branch as needed.
closeWindow.html
ASKER
Thank you All for your help.
@Sam;
That is a great workaround. How does it work in a hta script 'window.close()'.
Thanks.
@Sam;
That is a great workaround. How does it work in a hta script 'window.close()'.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Even is basically the same as mine, it's work well.The idea is to load self and close it. Another is to first empty the inner and next close,because an empty element are not throwing the page protection routine.
Change http://*.live.com to problem domain in question.
reference : https://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/ie9-how-do-i-disable-the-ie-popup-the-webpage-you/0451d034-90d7-4de9-8757-a00b24e55b82?page=2