Jan 23, 2020, 3:49 AM
Trigger page_load in child iframe page when calling parent direct method
Hello!
We are using version 4.8.3 of ext.net.
When the child iframe called the directmethod of the parent, the page_load in the child page was triggered. But when I downgraded to version 4.2, page_load was not triggered in the child page, do you have any solution to this problem?
We have also checked that page_load was triggered twice in IE 11 only, it works fine in firefox and chrome.
For version 4.2, it works normally in IE 11 and other browsers.
Thank you for your help in advance.
Below is the sample code for your reference:
Child
Parent
We are using version 4.8.3 of ext.net.
When the child iframe called the directmethod of the parent, the page_load in the child page was triggered. But when I downgraded to version 4.2, page_load was not triggered in the child page, do you have any solution to this problem?
We have also checked that page_load was triggered twice in IE 11 only, it works fine in firefox and chrome.
For version 4.2, it works normally in IE 11 and other browsers.
Thank you for your help in advance.
Below is the sample code for your reference:
Child
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
Console.WriteLine("First Load");
}
}
</script>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager" runat="server" Locale="en-US" DisableViewState="true" ScriptMode="Release" />
<div>
<ext:Button runat="server" Text="Test" MarginSpec="0 5 0 0" Handler="parent.test();">
</ext:Button>
</div>
</form>
</body>
</html>
Parent
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
Console.WriteLine("First Load");
}
}
[DirectMethod]
public void Test()
{
X.Msg.Alert("Test", "Test").Show();
}
</script>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
var test = function () {
App.direct.Test({
eventMask: {
showMask: true
}
});
};
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager" runat="server" />
<div>
<ext:TabPanel ID="CenterPanel" runat="server" Region="Center">
<Items>
<ext:Panel runat="server" ID="Tab" Title="Ajax Tab" Width="600"
Height="250">
<Loader runat="server" Mode="Frame" Url="Child.aspx">
</Loader>
</ext:Panel>
</Items>
</ext:TabPanel>
</div>
</form>
</body>
</html>
Last edited by kwcitadmin; Jan 23, 2020 at 6:38 AM.