What's the difference between the input type "text" and "password" in an html form?

Posted by Domingo on Stack Overflow See other posts from Stack Overflow or by Domingo
Published on 2010-05-17T22:48:26Z Indexed on 2010/05/17 22:50 UTC
Read the original article Hit count: 241

Filed under:

Hi everybody, this question might seem stupid, but here's the situation: I'm trying to create an auto login page for my mail using jquery's post request, but it's not working, it works with all other pages except with webmail. So, trying to figure out what was wrong, I recreated the login form, here's the code:

<form id="form1" name="form1" method="post" action="https://login.hostmonster.com/">
<input type="text" name="login" id="user" />
<input name="password" type="password" id="pass" />
<input name="doLogin" type="submit" id="doLogin" value="Login">

The strange thing is when you change the input type of pass to text, the form doesn't work! I can't figure out why. Anyway, if you can tell me what's the real difference between the input type text and password (and not what it says everywhere on the net that the only difference is that when you type stars appear instead of characters) I would appreciate it. Also, do you think this is affecting my jquery's post? Here's the code for it:

$j.post('https://login.hostmonster.com/', { login: '[email protected]', password: 'xxx' }, function(data, text){
 if (text=='success')
  alert('Success '+data);
  } });

Thanks a lot! Regards,


© Stack Overflow or respective owner

Related posts about html

Related posts about form