top.frames - IE vs FF vs Chrome

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

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.
Who is Participating?
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:


alternatively you can use:

antonmsAuthor Commented:
Hi - including the NAME tag as you suggested worked just fine in FireFox. Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.