demophoon88 Posted July 24, 2009 Share Posted July 24, 2009 I just wanna ask upon how to change the custom characters outputed from <input type="password"> when a user types. Like for example instead of bullets(firefox) or asterisks(IE), the output would be japanese characters or some random characters. :'( please move this post if it does not belong here coz i think it may need some javascript or something.. thanks.. Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/ Share on other sites More sharing options...
haku Posted July 24, 2009 Share Posted July 24, 2009 I have no idea if this is possible, but if it is, it will definitely be through javascript, which is why I moved it here. edit: that should be 'almost definitely'. Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-881817 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 There is no browser friendly way to style the password field directly. What you will have to do is use Javascript either to edit a hidden input field when a key is pressed (although it will get tricky with deletes) or switch between regular input and password when it goes in and out of focus. It seems rather unnecessary to me though Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-882045 Share on other sites More sharing options...
Psycho Posted July 25, 2009 Share Posted July 25, 2009 I know I've seen an example of this somewhere, but to be honest it would be foolish to implement in my opinion. To accomplish this you would have to create a workaround to the browsers default handling of password fields or use some sort of hack to a regular input field. You might get it to work in most, or maybe even all, current scenarios. But, for a password input even one failure would be unacceptable to me. The consequences would be either the password would be displayed in plain-text (kinda bad) or the password the user thinks they types gets mangled somehow which would prevent them from logging in (really bad). Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-882808 Share on other sites More sharing options...
abazoskib Posted July 26, 2009 Share Posted July 26, 2009 You would have to 'hack' a regular input field. Place each typed character into an array/stack/vector/etc.. and display the character of choice in your text field each time a user types a letter. Pretty easy to do, however, what if the user does not have the character set on their machine that you use? Their password would be displayed out in the open. Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-883512 Share on other sites More sharing options...
ldougherty Posted July 26, 2009 Share Posted July 26, 2009 What about changing the character set of the login page? Would that change the input type password character as well? Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-883515 Share on other sites More sharing options...
Psycho Posted July 27, 2009 Share Posted July 27, 2009 You can set the font of the field itself like this <input type="password" style="font-family:wingdings"> I did see a page when I was looking for this previously that changed the masked character to a vertical line. Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-883688 Share on other sites More sharing options...
haku Posted July 27, 2009 Share Posted July 27, 2009 I don't think wingdings is a standard font on macs (I may be wrong though - I'm a PC user). If it's not, then that may display differently on macs. Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-883693 Share on other sites More sharing options...
Psycho Posted July 27, 2009 Share Posted July 27, 2009 I don't think wingdings is a standard font on macs (I may be wrong though - I'm a PC user). If it's not, then that may display differently on macs. You are correct. This whole subject is pointless in my opinion. It adds absolutely no value to the user and trying to implement a hack could only serve to create a security risk. Quote Link to comment https://forums.phpfreaks.com/topic/167245-custom-password-characters/#findComment-883699 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.