有没有办法以编程方式强制IE8在新窗口而不是选项卡中打开弹出窗口?

问题描述:

有没有办法以编程方式指示IE8在新窗口而不是新标签中打开弹出窗口?我知道IE支持模态窗口,但我有一堆普通弹出窗口的遗留代码。

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.

更新:

我使用Javascript的window.open()方法创建弹出窗口。但是,当用户将其IE8设置设置为始终在新选项卡中打开弹出窗口时,弹出窗口将在新选项卡而不是新窗口中启动。

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.

因为没有其他人正在进行...进一步研究后,似乎你不能强行弹出当IE8用户启用以下浏览器设置时打开到新窗口:工具>> Internet选项>>选项卡>>遇到弹出窗口时:>>始终在新选项卡中打开弹出窗口

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.

由于我在Intranet环境中,我可以选择将用户IE设置锁定为让Internet Explorer决定弹出窗口应该如何打开或始终在新窗口中打开弹出窗口。

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. 将现有弹出窗口转换为 IE特定模态对话框使用的showModalDialog()方法

转换e使用 jqModal 或其他一些 jQuery插件

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