[CLOSED] JScript method not called under FF and GH in user control loaded dynamically

  1. #1

    [CLOSED] JScript method not called under FF and GH in user control loaded dynamically

    Hi support team,

    When I execute the code below and click 'Load user control', then click 'MyButton' it shows the message 'ok !!!' under IE, but it doesn't work under FF and GH. Would you suggest a fix?

    Thanks,
    Alex

    WebForm.aspx
    <%@ Page Language="C#" %>  
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> 
    <script runat="server">
        [DirectMethod]
        public void MyControl()
        {
            Control control = LoadControl("Child.ascx");
            Panel1.ContentControls.Add(control);
            Panel1.UpdateContent();
        }
    </script>         
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head id="Head1" runat="server">     
    <title>Ext.NET Examples</title>
    </head> 
    <body>     
    <form id="Form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Button ID="Button1" runat="server" Text="Load UserControl" OnClientClick="Ext.net.DirectMethods.MyControl();" />
    <ext:Panel ID="Panel1" runat="server" Title="Example" />     
    </form> 
    </body> 
    </html>
    Child.ascx
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>   
    <ext:XScript ID="XScript1" runat="server">
        <script type="text/javascript">
            function Test() {
                alert("ok !!!");
            }
        </script>
    </ext:XScript>
    <ext:Panel runat="server" ID="ChildPanel1" BodyStyle="background: #FFFDDE">     
    <Items>         
    <ext:Button ID="Button1" runat="server" Text="My Button">
        <Listeners>
        <Click Handler="Test();" />
        </Listeners>
    </ext:Button>
    </Items> 
    </ext:Panel>
    Last edited by Daniil; Dec 08, 2011 at 1:08 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I've just checked the code in IE, FF and Chrome and it appears to be working the same way - I see an alert box with "Ok" text.

    Updating from SVN might solve the problem.
    Last edited by geoffrey.mcgill; Dec 07, 2011 at 8:04 PM.
  3. #3

    Fixed.

    Thank you Daniil,

    I've updated dlls with Ext.NET 1.2.0 and it works ok now.

    Regards, Alex

Similar Threads

  1. Replies: 1
    Last Post: Jul 25, 2011, 9:59 AM
  2. [CLOSED] [1.0] User Control loaded several times
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 07, 2011, 10:33 AM
  3. [CLOSED] Dynamic loaded user control height problem
    By Suntico in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jun 27, 2011, 8:54 AM
  4. [CLOSED] Store.reload() not being called in user control
    By IT1333 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Jun 14, 2011, 9:02 PM
  5. Replies: 32
    Last Post: Jan 11, 2011, 9:53 AM

Tags for this Thread

Posting Permissions