robert_gsfame Posted February 16, 2010 Share Posted February 16, 2010 I have this code <input type="text" name="password" id="password" style="color:#CCCCCC" value="Type Password" onfocus="if(this.value==this.defaultValue){this.value='';this.style.color='#000000';this.type='password';}" onblur="if(this.value==''){this.type='text';this.value=this.defaultValue;this.style.color='#CCCCCC';}"/> The problem is that when i try to type something inside password textbox let say "myname", it didnt change the text into password type ( ******) Which part is wrong?? it worked well in mozilla browser but not in IE 6.0 Link to comment https://forums.phpfreaks.com/topic/192263-small-help-needed/ Share on other sites More sharing options...
cr55dan Posted February 16, 2010 Share Posted February 16, 2010 Input type = "password" i think i used in mine, and when i'm typing it hides the character... Link to comment https://forums.phpfreaks.com/topic/192263-small-help-needed/#findComment-1013174 Share on other sites More sharing options...
robert_gsfame Posted February 16, 2010 Author Share Posted February 16, 2010 but i wish to have some text typed "Input password" when nothing was there Link to comment https://forums.phpfreaks.com/topic/192263-small-help-needed/#findComment-1013176 Share on other sites More sharing options...
cr55dan Posted February 16, 2010 Share Posted February 16, 2010 sorry, i personally can't help with that, i'm still new to php and mysql. Have you tried the input type = 'password' though?? Link to comment https://forums.phpfreaks.com/topic/192263-small-help-needed/#findComment-1013178 Share on other sites More sharing options...
robert_gsfame Posted February 16, 2010 Author Share Posted February 16, 2010 anyway thx dan, input type=password will turn anything inside the textbox to ***** including text which should appear when the text box is empty Link to comment https://forums.phpfreaks.com/topic/192263-small-help-needed/#findComment-1013182 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.