top.frames -  IE vs FF vs Chrome

Posted on 2012-08-17
Last Modified: 2012-08-17
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.
Question by:antonms
    LVL 16

    Accepted Solution

    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:


    Author Closing Comment

    Hi - including the NAME tag as you suggested worked just fine in FireFox. Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
    This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now