frames breaking scripts - Mozilla

This is a discussion on frames breaking scripts - Mozilla ; Hi All, For an internal project we have created an extension which using frames. and while embedding some of the webpages to the frame. the page reloads and breaks our frameset. Is there are way to prevent the frame prevention ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: frames breaking scripts

  1. frames breaking scripts

    Hi All,

    For an internal project we have created an extension which using
    frames. and while embedding some of the webpages to the frame. the
    page reloads and breaks our frameset. Is there are way to prevent the
    frame prevention script from unloading the frameset.

    for eg if the code is present in the webpage the page reloads the
    frameset with its own url.

    if(top.location.href != "http://google.com"){
    top.location.href = http://google.com;
    }

    in there a way to listen to such events and stop the event from
    loading . such as event.preventdefault();

  2. Re: frames breaking scripts


    >
    > When you say it uses frames are these XUL iframe elements? You probably
    > need to use type="content" if you're going to load an arbitrary web page
    > into a XUL frame.
    >


    We are using html frames

    var f1 = gbrowser.selectedBrowser.contentWindow.document.cr eateElement
    ("frame");
    f1.setAttribute("src", "");
    f1.setAttribute("name", "nf1");
    f1.setAttribute("id", "nf1");
    f1.frameBorder = 0;

    it is used to buffer some client web pages. Do u think if we use XUL
    iframes, the frame breaking code will not have any effect

+ Reply to Thread