XScript dont work for me

  1. #1

    XScript dont work for me

    Hi, i have a simple panel in aspx, when i call this in Xscript, javascript give me this exception "Panel1 is not defined".
    In the source code of the aspx result page is ok, but, i dont know why the panel1 variable is not created.
    I attach the aspx.
    TnksWebForm1.zip
  2. #2
    i think because you put the XScript outside <form id="form1" runat="server"> so try to put it inside and test!
  3. #3

    CLOSED!

    Quote Originally Posted by webclouder View Post
    i think because you put the XScript outside <form id="form1" runat="server"> so try to put it inside and test!

    Perfect!, thanks!!!!
  4. #4
    Hi,

    All Ext.Net widgets are created in the document ready event handler. You try to access to Panel1 too early

    Please see how to fix it
    <%@ Page Language="C#" AutoEventWireup="true"  %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
              <Listeners>
                   <DocumentReady Handler="showPanel();" />
              </Listeners>
        </ext:ResourceManager>
        <ext:Panel ID="Panel1" runat="server" Height="300" Title="Title">
        <Content>aaaaaa</Content>
        </ext:Panel>
        </form>
    *<ext:XScript ID="XScript1" runat="server" >
    ****<script>
            function showPanel(){alert(#{Panel1});}
        </script>
    </ext:XScript>
    </body>
    
    </html>

Similar Threads

  1. Help me dont work UserControl directmethod. plz
    By SeoNamseok in forum 2.x Help
    Replies: 0
    Last Post: Jul 09, 2012, 8:19 AM
  2. i dont get params in dynamically propertygrid
    By cesurheart in forum 1.x Help
    Replies: 23
    Last Post: Feb 06, 2012, 12:27 PM
  3. Replies: 0
    Last Post: Dec 04, 2011, 2:28 PM
  4. [CLOSED] Dont display "Uncommited Changes" Question
    By tms in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: May 18, 2010, 10:55 AM
  5. icons dont show
    By tonymayoral in forum 1.x Help
    Replies: 3
    Last Post: May 23, 2009, 9:59 PM

Tags for this Thread

Posting Permissions