Forum Moderators: open
<input type="text" name="Zip" value=" Zip" size="5" maxlength="5">
I have seen other pages where the word vanishes when the cursor is placed inside the textbox. How is this done? Thanks.
This code could also cause some user frustration, causing data they've entered to be "deleted" if they fill out a form field and then click on it again -- such as to correct a typo.
Just something to consider when implementing this.
I think ZIP code's a perfect example of where it'd be well-suited and not unduly detrimental; minimal retyping would be needed if the user did indeed return to the ZIP field and unintentionally wipe it out on click... but it'd be a pain to have to rekey a street address, email address, etc.
Keyplyr, maybe you could provide a bit more information on what you've done and what error the browser reported? - RonPK
And Shannon, thanks for the heads-up. I can't think of a reason why I would want to delete pre-filled text boxes in anything other than the example I gave, but I wouldn't have thought of that scenario.
And thanks Lorax, good to know there is an alternative. Also this helps to build the information archive at WebmasterWorld.