即使启用了 ie6 弹出窗口阻止程序,如何打开 2 个窗口
似乎当尝试从连续的 windows.open 调用中打开 2 个窗口时,它只允许第一个窗口打开并删除对第二个窗口的引用。我知道这可能听起来有点笨拙,但我们确实需要第二个弹出窗口。
有什么想法吗?
不幸的是,我们正在解决一个用户案例,其中用户端的 ie6 启用了弹出窗口阻止程序。
It seems like when trying to open 2 windows from a succession of windows.open calls, it only allows the first window to open and deletes the reference to the second window. I know this probably sounds a little kludgy, but we do need to have that second popup.
Any ideas?
Unfortunately we are addressing a user-case, where ie6 on the user end has popup blocker enabled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
编辑:我刚刚意识到您可能正在为两个窗口使用空白('')窗口名称:
这可能是通过 IE6 以外的浏览器中的不同窗口来处理的。
如果这不起作用,您可以考虑注入显示在内容顶部的 div(而不是使用弹出窗口),这被认为是更好的做法。
EDIT: I just realized that you probably are using a blank ('') window name for both windows:
This is probably handled with different windows in browsers other than IE6.
If that does not work, you might consider injecting divs that display on top of your content (instead of using popups), which is considered a better practice.
默认情况下,IE 弹出窗口拦截器仅允许每个用户启动的操作(即单击某个元素)打开一个新窗口。如果您尝试在同一处理程序中打开两个新窗口以响应单个用户启动的操作,则只有第一个窗口会成功打开。这是设计使然。
用户可以使用一个覆盖键:在 IE6 上我认为它是 CTRL,但它可能是 CTRL+ALT,因为它在更高版本中发生了变化(不确定是否向后移植)。
如果您转到工具 -> Internet 选项 -> 弹出窗口阻止程序 -> 设置 -> 阻止级别:,然后查看下拉框中的“高”值会在括号中告诉您覆盖键。
在同一设置对话框中,您还可以将此特定站点添加到“允许的站点”列表中,然后弹出窗口阻止程序将使该站点上的所有新窗口创建尝试成功。我很确定这个列表也可以通过组策略或 IEAK 或类似的东西来预先填充。但这只是存储在注册表中的一个列表,因此您还可以编写登录脚本,仅在需要添加内容时添加这些内容。
如果您还有其他问题,请告诉我(我是实现 IE 弹出窗口拦截器的开发人员)。
The IE pop-up blocker, by default, only allows one new window to be opened per user-initiated-action (i.e. a click on some element). If you try to open two new windows in the same handler in response to a single user-initiated-action, only the first window will successfully be opened. This is by design.
There is an override key that users can use: on IE6 I think it is CTRL, but it might be CTRL+ALT because it got changed in later versions (not sure if that was back-ported or not).
If you go to Tools->Internet Options->Pop-up Blocker->Settings->Blocking Level: and look at the value in the drop-down box for "High" it will tell you the override key in a parenthetical phrase.
In the same settings dialog, you can also add this specific site to the "Allowed sites" list, and then pop-up blocker will let all new window creation attempts on said site succeed. I'm pretty sure this list can also be pre-populated through group policy or IEAK or something like that too. But it's just a list that is stored in the registry, so you can also write log-in scripts that will just add things if they need to be added.
If you have further questions, let me know (I was the developer who implemented the IE pop-up blocker).
IE6 听起来像是一个企业安装。假设确实如此,请联系您的管理员并让组策略将您的内部网站设置为位于 Intranet 区域中,并关闭该区域的弹出窗口阻止程序。
IE6 makes it sound like it's a corporate installation. Assuming that's true, contact your administrators and have group policy set your internal website to be in the Intranet zone, and turn off the popup blocker for that zone.