[CLOSED] IFrame load fails on FF and Chrome

  1. #1

    [CLOSED] IFrame load fails on FF and Chrome

    Hi folks, i have a ViewPort with two regions: Center and East. When the Button _btnFirstClick in the East region is clicked, the function OpenApp is called, this function is responsable for creating a new Panel, which contains another Button. When this second Button is clicked, the function OpenNewApp is called and then, an IFrame Panel is created, which loads Ext.Net Web Site.

    The process described above runs perfectly on IE8, but on FF and Chrome, it fails - the load of Ext.Net Web Site.

    Any ideas to overcome this issue?

    1 - Javascript
    var TestPanel = null;
    var OpenApp = function () {
        TestPanel = Ext.create('Ext.panel.Panel', {
            floating: {
                cls: "FloatingPanel"
            }
        });
    
        var botao = Ext.create('Ext.Button', {
            text: 'Click here',
            handler: function () {
                OpenNewApp();
            }
        });
    
        TestPanel.add(botao);
    
        TestPanel.show();
    }
    
    var OpenNewApp = function () {
        TestPanel.close()
        var TestPanel2 = Ext.create('Ext.panel.Panel', {
            floating: {
                cls: "FloatingPanel"
            },
            autoLoad: {
                mode: "iframe",
                url: "http://ext.net"
            }
        });
    
        TestPanel2.show();
    }
    2 - View
    <ext:ResourceManager ID="_rsm" Locale="pt" runat="server" />
    <ext:Panel ID="_pnlApp" runat="server">
        <Loader ID="Loader1" Url="/Example/CreateApp/" Mode="Component" AutoLoad="true" runat="server" />
    </ext:Panel>
    3 - Actions
    public ActionResult CreateApp()
    {
        //View Port
        Viewport vwp = new Viewport
        {
            ID = "_vwpCorpo",
            Layout = "BorderLayout"
        };
    
        //Center
        Panel pnlCenter = new Panel
        {
            Title = "Ext.Net",
            Region = Region.Center
        };
    
        vwp.Items.Add(pnlCenter);
    
        //East
        FormPanel pnlEast = new FormPanel
        {
            Title = "teste",
            MinWidth = 200
        };
    
        pnlEast.Region = Region.East;
        vwp.Items.Add(pnlEast);
    
        // Button in the East Panel
        pnlEast.Add(new Button()
        {
            ID = "_btnFirstClick",
            Text = "First click",
            Handler = "function () { OpenApp(); }"
        });
    
        // Return a ContentResult with the configured Viewport
        return new ContentResult { Content = ComponentLoader.ToConfig(vwp) };
    }
    Last edited by geoffrey.mcgill; Oct 16, 2012 at 8:10 PM. Reason: [CLOSED]
  2. #2
    Hi Raphael,

    As I stated in another thread - it is incorrect to load a Viewport into a Panel. A Viewport must be a top level container within <body> or <form runat="server">.

    Though, probably, it doesn't cause this issue.

    but on FF and Chrome, it fails - the load of Ext.Net Web Site.
    Please provide more details how exactly it fails.

    Also note that you should use
    renderer: "frame"
    in Ext.NET v2 instead of
    mode: "iframe"
    Though it also doesn't cause the issue, because there is "http" in the URL, so, the "frame" renderer will be forced.
    Last edited by Daniil; Oct 16, 2012 at 5:52 PM.
  3. #3
    To overcome the issue described in this Thread, please refer to the following Thread: http://forums.ext.net/showthread.php...anel-s-content

Similar Threads

  1. [CLOSED] iFrame load alternative?
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Oct 11, 2012, 2:13 PM
  2. [CLOSED] iframe onFocus failing w/Chrome & Firefox
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 12, 2012, 8:08 AM
  3. load iframe from javascript
    By pintun in forum 1.x Help
    Replies: 5
    Last Post: Dec 27, 2011, 3:15 PM
  4. Replies: 0
    Last Post: Sep 05, 2011, 2:59 PM
  5. Replies: 4
    Last Post: Apr 14, 2010, 4:12 PM

Posting Permissions