[CLOSED] TextField InputType = Password EmptyTest is masked

  1. #1

    [CLOSED] TextField InputType = Password EmptyTest is masked

    Last edited by Daniil; Mar 15, 2013 at 4:17 AM. Reason: [CLOSED]
  2. #2
    Hello!

    Quote Originally Posted by SFritsche View Post
    I have found that setting the EmptyTest on a text field set as InputType=Password renders with the Empty Text masked.
    Sorry, I don't quite understand you. What you want to change? You want to remove mask? Also, can you say what version of Ext.NET and browser do you use?
  3. #3
    Yes, when the control's value is empty, I want the EmptyText value to show unmasked. Once the control gets focus, I want the characters that I type in to be masked. To do this, I was trying to change the InputType at the client level on the fly. It seems like the browser does not allow that. Any ideas?

    IE 9
    Ext.NET v 2.1

    Thanks.
    -Steve
  4. #4
    Hi Steve,

    Yes, I doubt it is possible to change an inputType of the fly.

    Maybe something like this.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:Container 
                runat="server" 
                Height="22" 
                Width="150" 
                Layout="CardLayout">
                <Items>
                    <ext:TextField runat="server" EmptyText="Password" SubmitValue="false">
                        <Listeners>
                            <Focus Handler="this.up('container').layout.setActiveItem(1);" />
                        </Listeners>
                    </ext:TextField>
                    <ext:TextField runat="server" InputType="Password">
                        <Listeners>
                            <Activate Handler="this.focus();" />
                            <Blur Handler="if (this.getValue() === '') {
                                                this.up('container').layout.setActiveItem(0);
                                            }" />
                        </Listeners>
                    </ext:TextField>
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>
  5. #5
    Daniil,

    That is a very nice solution. I will work with that. Thank you.

    -Steve

Similar Threads

  1. Implement a Password Meter to a Password Field
    By sudantha in forum 1.x Help
    Replies: 1
    Last Post: Jan 15, 2012, 6:59 AM
  2. [CLOSED] GridPanel: How to set EmptyTest in Server Side codes
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 20, 2011, 10:00 AM
  3. Replies: 2
    Last Post: Jun 25, 2010, 1:09 AM
  4. [CLOSED] TextField InputType.Password
    By jsemple in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 10, 2009, 1:30 PM

Tags for this Thread

Posting Permissions