« Return to the blog entry
I totally agree. It is a pain to look back up at a screen and see half your password in plain view.
One trick I've used in the past is to use an if statement in the onload event.
If(document.getElementById('myfield').value==""){document.getElementById('myfield').focus()}
So if the field is blank then move the cursor there, if it's not blank then assume that the user has already started typing and don't do anything.
I totally agree. It is a pain to look back up at a screen and see half your password in plain view.
One trick I've used in the past is to use an if statement in the onload event.
If(document.getElementById('myfield').value==""){document.getElementById('myfield').focus()}
So if the field is blank then move the cursor there, if it's not blank then assume that the user has already started typing and don't do anything.