Announcement

Collapse
No announcement yet.

Password input fields

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Password input fields

    Is it possible to assign a certain character/image to the password input field? I kow that whether it shows * or a dot is down to the browser, but can you set it yourself to always show a specific thing?

  • #2
    Hey Novus, I'm pretty sure it's based on the browser/os you're using and as far as I know it's not something that can be dramatically changed via css.

    You can make a slight change by adding the following to the input box styles.
    Code:
     font-family: courier, sans-serif;
    You could also change it using javascript which will replace all the astrix/dots as they're typed, although I'm not sure if it's worth the time to make such a small change.

    Comment


    • #3
      hello friend.
      I did go through that link .
      But still can you please post me the sample code which contains a simple text box and takes the input as password in "#".
      just paste the code as a reply to this one.......

      thank you buddy.

      Comment


      • #4
        Hi there neo_sharath,

        it can be faked with javascript but you should understand that password protection that
        is not done server side is reallly pointless as anyone can discover what the password is.

        Here is the example....
        Code:
        
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
           "http://www.w3.org/TR/html4/strict.dtd">
        <html>
        <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        
        <script type="text/javascript">
           var k=0;
           var df;
        window.onload=function() {
           df=document.forms[0];
        df[1].onkeyup=function() {
        df[0].value+=df[1].value.charAt(k);
           k++;
        for(c=0;c<df[1].value.length;c++) {
           df[1].value=df[1].value.replace(df[1].value.charAt(c),'#');
           }
          }
         }
        </script>
        
        </head>
        <body>
        
        <noscript>
        <div>
        Without javascript enabled you will be unable to login
        </div>
        </noscript>
        
        <form action="http://www.google.com/">
        <div>
        <input type="hidden" name="password">
        <input type="text">
        <input type="submit" value="submit password">
        </div>
        </form>
        
        </body>
        </html>
        


        ~ the original bald headed old fart ~

        Comment

        Working...
        X