IE prevents Window.close()

Hi ..
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|No
I 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.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Internet options - Security - Trusted sites - Sites
Uncheck Require server verification (https:) for all sites in this zone
Adding http://* fixed my problem.

Change http://* to problem domain in question.

reference :
Chinmay PatelChief Technical NinjaCommented:
Hi NetRock6,

Your script didn't make it. Please update the question with it.

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Zakaria AcharkiAnalyst DeveloperCommented:
Gerald NegrotaIT ProfessionalCommented:
Nothing to do by changing the settings.
Use this:
function quitBox(cmd)
    if (cmd=='quit')
        open(location, '_self').close();
    return false;  
Sam JacobsDirector of Technology Development, IPMCommented:
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.
NetRock6Author Commented:
Thank you All for your help.

That is a great workaround. How does it work in a hta script 'window.close()'.

Sam JacobsDirector of Technology Development, IPMCommented:
It works for an .hta as well ... please see attached (remove the .txt extension).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gerald NegrotaIT ProfessionalCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.