Any way to programmatically force IE8 to open popups in a new window instead of a tab?

泄露秘密 提交于 2019-12-08 16:23:54

问题


Is there a way to programmatically instruct IE8 to open a popup in a new window rather than a new tab? I know that IE supports modal windows but I have a bunch of legacy code with ordinary popups.

Update:

I am using Javascript's window.open() method to create popup windows. However, when a user has their IE8 settings set to "Always open popups in a new tab", the popup is launched in a new tab rather than a new window.


回答1:


Using html, the best you can do is set open page target to blank. Everything else is controlled by the client side and they can choose to open it in a new window or tab.

However, you can use javascript to open the window. Create Link to open in new window here




回答2:


Since no one else is chiming in... After doing further research, it seems that you cannot force a pop-up to open into a new window when an IE8 user has the following browser setting enabled: Tools>>Internet Options>>Tabs>>When a pop-up is encountered:>>Always open pop-ups in a new tab.

Since I am in an Intranet environment, I have the option of locking down a users IE settings to either "Let Internet Explorer decide how pop-ups should open" or "Always open pop-ups in a new window".

I don't really care to exercise the above option so in order to get the desired user experience, I will resort to making one of the following code changes:

  1. Convert existing pop-ups to IE specific Modal Dialogs using the showModalDialog() method.

  2. Convert existing pop-ups to Javascript Modal Dialogs using jqModal or some other jQuery plug-in.




回答3:


If you opt to let Internet Explorer decide how to display pop-ups, it will display the pop-up in a new window if the pop-up specifies size or display requirements. Otherwise, the pop-up is displayed in a new tab.

http://windows.microsoft.com/en-US/windows-vista/Tabbed-browsing-in-Internet-Explorer-8-frequently-asked-questions

So if you don't set any specific window requirements and it should open in a new tab, unless a user has changed these settings.



来源:https://stackoverflow.com/questions/3248042/any-way-to-programmatically-force-ie8-to-open-popups-in-a-new-window-instead-of

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!