icu222much — 2011-07-21T22:28:43-04:00 — #1
I have several input text boxes. The default value for the boxes is the description of the contents of the box. When the user clicks on the box to type, the default values disappear so they can begin typing.
My problem is what if the user forgets what the contents of the box is suppose to be. I am looking for a solution where if the input box is empty, and the user deselects it, the original default value will appear.
<input type="text" value="Event Name" onfocus="value=''" />
cybertoolz — 2011-07-21T22:36:43-04:00 — #2
Without Java I wouldnt know how to make the text re appear
but what about adding a ? with a false link and a title so when the question mark is hovered the info will pop up
<input type="text" value="Event Name" onfocus="value=''" /><a href=" " title="what the user needs to remember">?</a>
icu222much — 2011-07-22T00:07:29-04:00 — #3
That false ? is a pretty good idea. I will use that as my last resort. My goal is to keep the site as clean as possible, which is why I opted to describe the purpose of each text field within itself.
amritrr — 2011-07-31T12:47:59-04:00 — #4
We usually use a dynamic page for forms utilizing some sort of programming language. Using Ajax with Asp.net will achieve what you want easily.
adam_chrapkowski — 2011-09-20T04:33:55-04:00 — #5
I suggest to use some jQuery plugin such like http://www.aakashweb.com/jquery-plugins/textbox-hinter/, if I remember well it works for both textarea and text input.