[CLOSED] Disabled controls bug

  1. #1

    [CLOSED] Disabled controls bug

    Hello, disabled controls seems to sent nothing to the server, example:

     <ext:TextField runat="server" ID="txt1" Disabled="True"/>
             <ext:TextField runat="server" ID="txt2"/>
             <ext:Button runat="server" Text="Copy from second to first">
                 <Listeners>
                     <Click Handler="#{txt1}.setValue(#{txt2}.getValue());"></Click>
                 </Listeners>
             </ext:Button>
             <ext:Button runat="server" Text="Display Value of First on server" OnDirectClick="btn2_click">
                 
             </ext:Button>
    protected void btn2_click(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("This is always empty", txt1.Text).Show();
        }
    Fill something in second textbox and click first and second button.

    Applies to Textfield and Combo

    I think this is a bug, nearly sure that it worked fine in ext 1.4
    Last edited by Daniil; Oct 09, 2012 at 10:36 AM. Reason: [CLOSED]
  2. #2
    First, according W3C standard, disabled input elements are not submitable
    http://www.w3.org/TR/html401/interac...html#h-17.12.1
    http://www.w3schools.com/tags/att_input_disabled.asp

    Ext.Net direct event changes such behaviour, disabled elements are submitable bu default
    Here is my test case and it works correctly (i see the value in message)
    <%@ Page Language="C#" %>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET Examples</title>    
    
    
        <script runat="server">
            protected void btn2_click(object sender, DirectEventArgs e)
            {
                X.Msg.Alert("This is always empty", txt1.Text).Show();
            }
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />           
                
            <ext:TextField runat="server" ID="txt1" Disabled="True"/>
            <ext:TextField runat="server" ID="txt2"/>
            <ext:Button runat="server" Text="Copy from second to first">
                <Listeners>
                    <Click Handler="#{txt1}.setValue(#{txt2}.getValue());"></Click>
                </Listeners>
            </ext:Button>
            <ext:Button runat="server" Text="Display Value of First on server" OnDirectClick="btn2_click">
                 
            </ext:Button>
        </form>
    </body>
    </html>
    Therefore please ensure that you use latest code, update from 2.1 branch (http://svn.ext.net/premium/branches/2.1) and retest
  3. #3
    I'm on 2.0, 2.1 was not released yet, no?
    Could that be a problem?
  4. #4
    Yes, v2.1 is not released, but you can get its sources from SVN:
    http://svn.ext.net/premium/branches/2.1/

Similar Threads

  1. [CLOSED] Css Styles to Disabled controls don´t works in IE 9
    By supera in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 07, 2012, 10:09 AM
  2. ASP controls disabled in ajaxevent
    By raju145in in forum 1.x Help
    Replies: 0
    Last Post: Oct 19, 2011, 12:42 PM
  3. Replies: 2
    Last Post: Feb 16, 2011, 9:10 AM
  4. Replies: 0
    Last Post: Jan 05, 2011, 6:48 AM
  5. getting values of disabled controls
    By [WP]joju in forum 1.x Help
    Replies: 0
    Last Post: Sep 02, 2009, 10:29 AM

Posting Permissions