2012-06-05 35 views
0

我在一个页面上有多个iframe项目(基于vb.net的应用程序),特别是,一个是保存生成详细信息框架的链接的框架。目前JavaScript是为IE工作,但在其他浏览器中使用时,它无法正常工作。下面是导致此错误页面上的多个iframe - 只有IE正确更改其他框架

window.parent.detailFrame.location.href = form + "?cat=" + cat + "&par=" + par + "&HighlightID=" + HighlightID; 

我可以告诉大家这条线是不正确的Firefox,因为这条线后,将在功能警报时,他们不火行,但他们在IE做。任何人都可以看到什么需要做这个工作在Firefox和IE?谢谢。

编辑:

我能够使用的项目,如 window.parent.getElementById( 'detailFrame')位置 或window.parent.getElementById( 'detailFrame')的href但不喜欢window.parent。 .getElementById('detailFrame')。location.href - 只使用.location或.href时,iframe不会刷新到新页面。

回答

-1

我认为,所有你需要做的是设置位置,没有位置的href:

window.parent.detailFrame.location = form + "?cat=" + cat + "&par=" + par + "&HighlightID=" + HighlightID; 
+0

呃......没有。改变位置是改变它的href的好办法。 –

+0

@kolink是正确的,这是不成功的 – njj56

+0

我能够使用像window.parent.getElementById('detailFrame')。location或window.parent.getElementById('detailFrame')。href但不喜欢window.parent。 getElementById('detailFrame')。location.href - 当使用.location或.href时,iframe不会刷新到新页面。 – njj56

0

能够使用的.src重做,不location.href

相关问题