Problem in loading Ifrmae in FireFox!

Posted by maddy on Stack Overflow See other posts from Stack Overflow or by maddy
Published on 2010-04-05T06:22:06Z Indexed on 2010/04/05 6:33 UTC
Read the original article Hit count: 288

Filed under:
|

Hello all,

I'm trying to load an aspx page using Iframe in VB.net. I'm trying to do it(setting the source of Iframe) with the help of Ext(JavaScript). aspx code:

< div id="container" >
 < iframe id="pane" name="pane" src="Empty.aspx" frameborder="0" >< /iframe>
< /div >

Javascript code:

Pane = function() {
    var pane;
    return {
        init: function() {
            if (!document.body) { return; }
            pane = Ext.get('pane');
            if ( something ) {
                this.load();
            } else {
                this.navigateTo('Page.aspx?id=' + a.ID);
            }
        },
        load: function() {
            pane.dom.src = 'HTTPURL';
        },
        navigateTo: function(url) {
            var agt = navigator.userAgent.toLowerCase();
            if (agt.indexOf("firefox") != -1) {
                document.getElementById('pane').src = url;
            } else {
                pane.dom.src = url;
            }
        }
    };
} ();

This works fine with IE and Ifrma gets loaded wuth page.aspx every time the parent page is requested. But with FireFox it doesn't. With FireFox the src attribute remains "Empty.aspx" when the page is loaded but when i refresh the page i.e. in post back event the scr attribute changes to "page.aspx?id=a.id" and iframe gets loaded properly.

Has anyone faced such kind of problem before? and knows the solution please help me, it's killing me big.

Thanks in Advance. Maddy.

© Stack Overflow or respective owner

Problem in loading Ifrmae in FireFox!

Posted by user309029 on Stack Overflow See other posts from Stack Overflow or by user309029
Published on 2010-04-05T06:01:57Z Indexed on 2010/04/05 6:03 UTC
Read the original article Hit count: 288

Filed under:

Hello all,

I'm trying to load an aspx page using Iframe in VB.net. I'm trying to do it(setting the source of Iframe) with the help of Ext(JavaScript). aspx code: &lt div id="container" &gt &lt iframe id="pane" name="pane" src="Empty.aspx" frameborder="0" &gt &lt /iframe &gt &lt /div &gt

Javascript code: Pane = function() { var pane; return { init: function() { if (!document.body) { return; } pane = Ext.get('pane'); if ( something ) { this.load(); } else { this.navigateTo('Page.aspx?id=' + a.ID); } }, load: function() { pane.dom.src = 'HTTPURL'; }, navigateTo: function(url) { var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("firefox") != -1) { document.getElementById('pane').src = url; } else { pane.dom.src = url; } } }; } ();

This works fine with IE and Ifrma gets loaded wuth page.aspx every time the parent page is requested. But with FireFox it doesn't. With FireFox the src attribute remains "Empty.aspx" when the page is loaded but when i refresh the page i.e. in post back event the scr attribute changes to "page.aspx?id=a.id" and iframe gets loaded properly.

Has anyone faced such kind of problem before? and knows the solution please help me, it's killing me big.

Thanks in Advance. Maddy.

© Stack Overflow or respective owner

Related posts about firefox

Related posts about JavaScript