Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1151
  • Last Modified:

top.frames - IE vs FF vs Chrome

Hi
The following js function is used to handle our load reports page event in a web app…

function loadReports(){
    top.frames["ifrMain"].document.location = "Reports.aspx";
}

It works perfectly on IE and Chrome, however when the web app is ran in Firefox 14.01 this error occurs…
TypeError: top.frames.ifrMain is undefined
http://localhost:53427/js/Sidebar.js

We have ran Firefox in Safemode, disabled all plug ins, tried it on other FF installations etc but the problem remains.

Can anyone help as its proving rather tricky to find a solution that works on all three browsers.
Thanks
0
antonms
Asked:
antonms
1 Solution
 
grahamnonweilerCommented:
First give each of your frames ID tags as well as NAME tags - these should be the same.


Then it will depend a lot on how far nested your frames are.

If this JS function is called from top, then use:

    parent.ifrMain.location.href='Reports.aspx';


alternatively you can use:

    top.ifrMain.location.href='Reports.aspx';
0
 
antonmsAuthor Commented:
Hi - including the NAME tag as you suggested worked just fine in FireFox. Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now