Link to home
Start Free TrialLog in
Avatar of eimonkey
eimonkeyFlag for United States of America

asked on

Webpage wants to close a window - disable prompt

On my Windows 7 workstations, I have a program that opens an IE window. After the user enters some information in that window, they click a button in the window to send the info and close the window. However, when they do this, IE pops up a question dialog, letting the user know that "the webpage you are using is trying to close the window" and asking if they want to allow this.

I am trying to disable the yes/no prompt in IE, so that the window automatically closes when it tries to do so. The only way I've found that I can do that is by disabling Protected Mode in the IE security tab, but my fear is that this is disabling a lot more than I want it to.

How can I turn off only that one type of dialog, without turning off everything else that's tied to Protected Mode.

We are using Win7 32-bit with IE9. I also tried this with IE8 and the same thing happens. With IE9, though, the dialog box actually pops up BEHIND the window that is trying to close, thus effectively locking IE9 completely and requiring me to kill it in the Task Manager.
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Avatar of eimonkey

ASKER

I'm sorry, I don't understand this link. Where do I set the window opener to something?

To clarify, I am not the webpage creator, so I can not alter the source code, if that's what your link is suggesting. I need a solution from the end user's point of view. Thanks!
Hi EIMonkey,

Is the webpage held within your site?  Or is it a 3rd party program that's doing all of this?

If it's a 3rd party program unfortunately you're out of luck.  The only thing I could recommend would be setting a bat file or something that modifies the settings before hand, launches your app, and close them after . . . though that wouldn't help if users were browsing the net at the same time.

If it's an internal application, I would talk to the developer and give them that link.  Let them know the experience you're having and see if they can fix it (it's a relatively short fix).
This is a 3rd party program that runs locally. Basically it's a print server dialog that sends the job from a local machine to the print server. So I don't have access to the code that calls up the IE window popup.

But my question, if you look back, is how do I turn off this prompt without turning off the rest of Protected Mode.
But my question, if you look back, is how do I turn off this prompt without turning off the rest of Protected Mode.

And the answer is you can't.  Protected mode does not have individual options. The code causes the problem and it would take playing with the code to fix it.  You don't have access to the codw, so you have no options.

Cd&
A work around would be to create a page similiar to the one used by the printer server.

Have the program call your page instead, and do some manipulation to pass the request, closing both browsers when you're done.

Barring that, hte only way is to turn off protected mode.
In that case, can you tell me what else Protected Mode does? I read Microsoft's page on the matter, and it was pretty vague. Something to the effect of "it makes your computer safer".

Specifically, does it just pop up prompts like the one I saw, when a webpage does something  suspect, or does it do other stuff behind the scene?

Also, what about the "Custom Level" button? Does that have anything to do with Protected Mode, or is that something different?

Thanks for your help. I appreciate it!
If you turn off protected mode while connected to the internet, then you are exposed to attacks that exploit activex capabilities to use privileged instructions.  You may also be reducing the effectivness of low end AV software that relies on common attack vectors being secured.

Cd&
OK, let me come at this problem from another angle.

This third party program calls up an IE webpage that is on our local print server, which I would think would be part of the Intranet, not Internet.

I tried adding that server, via the "Sites" button, to both Intranet and Trusted Sites zones where Protected Mode is disabled, but that did not stop the prompt from appearing. Why would that be? Is there a way to tell IE that this server is Intranet or Trusted, so ignore Protected Mode?
(edited post as author posted before my repsonse which is no longer needed)

According to this it should be disabled for trusted sites.
http://blogs.msdn.com/b/askie/archive/2009/02/17/protected-mode-now-disabled-for-the-local-intranet-zone-in-internet-explorer-8.aspx
Yes, I can confirm that it is disabled for Local Intranet and Trusted Sites. However, IE still seems to be treating this page as Internet, where Protected Mode is on.

For example, the page being called up is something like:

http://servername/folder/somejob.asp

Servername is a local server on our local network. So, I went to Local Intranet and added http://servername to the sites list. For good measure, I went to Trusted Sites and added https://servername to that sites list.

But still, it seems that IE's Internet Protected Mode is trumping that. Why is that/what do I need to do to get that server properly recognized as Local Intranet?
So, why would my local server be treated like it's in the Internet zone, especially when I've added it to the Local Intranet zone?
http://serverfault.com/questions/176874/why-is-my-file-server-in-the-internet-zone

Same logic should apply for your IIS server.  BE sure to visit the links within that link, they have some good references.
Thanks for the link. I will investigate this.
ASKER CERTIFIED SOLUTION
Avatar of eimonkey
eimonkey
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
None of the comments sufficiently addressed the issue. I just want the question closed.