Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    strange thing happened

    how to change the boring black circles on a password box to something like $$$$ or ®®®®®®®

    thanks in advance

  • #2
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    628
    Thanks
    51
    Thanked 67 Times in 67 Posts
    I don't think you can. The only time I've ever seen them change is in different web browsers, and that's either just a change in size or sometimes asterisks instead of circles.

  • #3
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the strange thing that happened, ealier I was logging into the script and I got love hearts instead of the black dots which is very strange. I did nothing for this to happen when I reloaded the page it was back to normal

  • #4
    Regular Coder
    Join Date
    Jul 2010
    Location
    St George, UT
    Posts
    138
    Thanks
    6
    Thanked 17 Times in 17 Posts
    You could write a javascript function that changes the keypress behavior.

    Something like

    Code:
    <html>
    <head>
    <title>Playground</title>
    
    <script type="text/javascript">
    var pw = "";
    function showPass() {
    	alert(pw);
    }	
    function maskField(obj,event) {
    	if (obj.value.length == 0) {
    		pw = "";
    	}
    	
    	if (window.event) {
    		var key = event.keyCode;
    	} 
    	else {
    		var key = event.charCode;
    	}
    	if (event.keyCode == 8) {
    		pw = pw.slice(0, -1);
    		obj.value = obj.value.slice(0, -1);
    	}
    	else if (key.toString().length > 0 && key > 33) {
    		char = String.fromCharCode(key);
    		pw = pw + char;
    		obj.value = obj.value + "&";
    	}
    	
    	return false;
    }
    </script>
    
    </head>
    
    <body>
    
    <form action="#" method="get">
    Text: <input type="text" id="password" onkeypress="maskField(this,event);return false;">
    <br /><br />
    <input onclick="showPass();" type="button" value="Show pass">
    </form>
    
    </html>
    There are a lot of things you would need to work out but that's at least a place to start.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •