PDA

View Full Version : [CLOSED] IFrame load fails on FF and Chrome



RCN
Oct 16, 2012, 2:43 PM
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) };
}

Daniil
Oct 16, 2012, 5:46 PM
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.

RCN
Oct 16, 2012, 7:30 PM
To overcome the issue described in this Thread, please refer to the following Thread: http://forums.ext.net/showthread.php?21472-Mask-position-when-loading-Panel-s-content