Feb 06, 2015, 11:18 AM
[CLOSED] IFrame's Loader "Load" listener is not fired when non-html content is loaded
Hi,
When the client have adobe acrobat reader installed then the viewer (or in FF build-in viewer) is loaded and then it loads the pdf file.
I would assume that Load event should be at least triggered when the viewer is loaded (not necessarily the pdf file within the viewer)
If you load html content then both BeforeLoad and Load events are triggered. When Acrobat viewer is loaded then only BeforeLoad is triggered.
Is it a bug or it meant to be like that by design ?
Update:
It is working fine in FF, Opera and Safari.
The event is not triggered in IE11.
Chrome is the odd one... the document is loading but the mask never disappear.
Thank you,
When the client have adobe acrobat reader installed then the viewer (or in FF build-in viewer) is loaded and then it loads the pdf file.
I would assume that Load event should be at least triggered when the viewer is loaded (not necessarily the pdf file within the viewer)
If you load html content then both BeforeLoad and Load events are triggered. When Acrobat viewer is loaded then only BeforeLoad is triggered.
Is it a bug or it meant to be like that by design ?
<%@ Page Language="C#" %>
<script runat="server">
private Window CreateWindow(string id, string url)
{
Window win = new Window()
{
ID = id,
Title = "Ext.NET",
Width = Unit.Pixel(1000),
Height = Unit.Pixel(600),
Modal = true,
AutoRender = false,
Collapsible = true,
Maximizable = true,
Hidden = true,
Loader = new ComponentLoader
{
Url = url,
Mode = LoadMode.Frame,
LoadMask =
{
ShowMask = true
},
Listeners =
{
BeforeLoad =
{
Handler = "alert('before load');"
},
Load =
{
Handler = "alert('content loaded');"
}
}
}
};
return win;
}
protected void Page_Load(object sender, EventArgs e)
{
this.Form.Controls.Add(
CreateWindow("Window1", "http://www.ext.net"));
this.Form.Controls.Add(
CreateWindow("Window2", "http://www.adobe.com/enterprise/accessibility/pdfs/acro6_pg_ue.pdf"));
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>IFrame's Loader "Load" listiner is not triggered when non-html content is loaded</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Button runat="server" Text="Html Content" Icon="Application">
<Listeners>
<Click Handler="#{Window1}.show(this);" />
</Listeners>
</ext:Button>
<ext:Button runat="server" Text="Pdf Content" Icon="Application">
<Listeners>
<Click Handler="#{Window2}.show(this);" />
</Listeners>
</ext:Button>
</form>
</body>
</html>
Update:
It is working fine in FF, Opera and Safari.
The event is not triggered in IE11.
Chrome is the odd one... the document is loading but the mask never disappear.
Thank you,
Last edited by Daniil; Feb 25, 2015 at 9:23 AM.
Reason: [CLOSED]