简体   繁体   中英

calling another frame ASP.NET C# function with javascript

in my MainFrame.aspx i have create the panel with load ajaxFrm.aspx

<ext:Panel ID="pnlAjax" runat="server" Height="30" Title="" Header="false" Frame="true">  
<AutoLoad Url="ajaxFrm.aspx" Mode="IFrame" ShowMask="false" />  
</ext:Panel>  

i the ajaxFrm.aspx having this C# LoadVehStore2 Function

function LoadVehStore2() {

}

in MainFrame.aspx i have a javascript when the page are load then run the javascript

frmAjax = parent.frames["pnlAjax"];
frmAjax.LoadVehStore2();

this thing can work proper in IIS,
but in Ubuntu Mono 3.3.0 are fail, why? how to solve this?

That's not C#. It's Javascript. I doubt that the problem is with Mono, I suspect the problem is with the browser.

Since the iframe is created by Ext.Net you have to reference it with the name Ext.Net gives to it. To get the name just use the developer tools of the browser, but it should be pnlAjax_IFrame . Or, if it's the only iframe in the parent page you'd better reference it by id:

frmAjax = parent.frames[0].LoadVehStore2();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM