Click to See Complete Forum and Search --> : Input field question


Bootsman123
05-11-2003, 02:56 PM
I've seen some sites (don't know them anymore) where you had an input field with a value like "Your e-mail adress here..." and if you focussed on the field it became blank, but if you left the field without filling anything in it had the same value again.

I have this:

<input type="text" name="search_string" class="inputText" size="29" value="Typ hier uw search..." onFocus="if (this.value == 'Typ hier uw search...') this.value = '';">


And if you focus it does became blank, but I don't know how to create it in such a way that it has the same value, "Typ hier uw search...", again.

havik
05-11-2003, 02:58 PM
You could try the onblur function

onblur="if (this.value == '') this.value = 'Typ hier uw search...';"

Havik