onKeyPress - replace text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amskape
    New Member
    • Apr 2010
    • 56

    onKeyPress - replace text

    I have the following controls

    <asp:TextBox ID="Password" runat="server" TextMode="Singl eLine" Text="Password" >
    </asp:TextBox>

    <asp:HiddenFiel d ID="uxHiddenPas sword" runat="server" />

    The initial value of the text box says "PASSWORD" because i have no labels on the page

    however, when someone starts typing a password, i want to **** out this password
    I pressume once i star it out, then this actually changes the value (its a registration form so i need to preserve their password to use for registering)
    i.e. if i * it out, i dont want their password to be a bunch of stars, so i figure i have to record this in a hidden field and use that value when doing registering?

    so points go to the person to who gives me the javascript that can do this

    i.e. on keypress updated hidden field then replace textbox value with *
    Thanks
    Anes P.A
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    usually you use an input field of the password type for that (don’t know which ASP controls are used for that).

    Comment

    Working...