I have text fields on a website. When I type things in it, hit the back button, then the forward button, the things I typed in are still there.
More specifically, the text boxes start of with grey text. When you type for the first time, the box empties the grey text, then shows what you type in black. When you do that, then hit the back button, then the forward, what we originally typed now appears in grey. Clicking on the box does not clear it anymore, and further typing is also in grey.
Here's my code (carriage returned for reading sake):
"<input id="friend_name_0"
type="text"
style="color: rgb(119, 119, 119);"
value="eg: Sharon"
onblur="if(this.value==''){this.value = 'eg: Sharon'; this.style.color = '#777777';}" onfocus="if(this.value == 'eg: Sharon'){clearField(friend_name_0); this.style.color = '#222222';}"
maxlength="9" "
name="friend_name_0"/>
Thanks guys!