当我使用 IE 7 打开弹出窗口时,我面临着这个问题。有什么办法可以解决这个问题
<h:form>
<h:commandButton value="Submit" action="#{bean.submit}">
<f:ajax render="popup" />
</h:commandButton>
<h:panelGroup id="popup">
<ui:fragment rendered="#{not empty bean.url}">
<script>window.open('#{bean.url}');</script>
</ui:fragment>
</h:panelGroup>
</h:form>
最佳答案
然后您的 IE7 配置为阻止(某些)弹出窗口或安装了弹出窗口阻止程序。通常它会阻止指向外部站点的弹出窗口。重新配置 IE 或禁用拦截器。
另一种方法是使用 HTML/JS/CSS div-with-overlay 方法或第 3 方 JSF 组件库(例如 PrimeFaces/RichFaces),它们具有用于此目的的组件。例如,带有 <p:dialog>
的 PrimeFaces .
关于java - Window.open 不适用于 IE7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7244042/