00:00
00:00
Newgrounds Background Image Theme

markololohands just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

HTML "value" boxes...

1,496 Views | 3 Replies
New Topic Respond to this Topic

HTML "value" boxes... 2001-06-24 13:18:30


Say i have a search box. I want it so inside the text box it originally says "SEARCH HERE", then when people click inside the box to type in a word - the text "SEARCH HERE" disappears so they can type in there text easily..anyone?

NOTE: it can also "highlight" the text "SEARCH HERE" if that can is easier..thanks

Response to HTML "value" boxes... 2001-06-24 15:09:17


input type="text" name="box" value="Search"
onBlur="if (box.value=='') { box.value='Search'; }"
onFocus="if (box.value=='Search') { box.value=''; }"

Response to HTML "value" boxes... 2001-06-24 15:45:54


At 6/24/01 03:09 PM, hwnd wrote:
input type="text" name="box" value="Search"
onBlur="if (box.value=='') { box.value='Search'; }"
onFocus="if (box.value=='Search') { box.value=''; }"

That's a much more elegant solution than the hotch potch code I came up with in the main forum ;)

Response to HTML "value" boxes... 2001-06-25 09:00:44


At 6/24/01 03:09 PM, hwnd wrote:
input type="text" name="box" value="Search"
onBlur="if (box.value=='') { box.value='Search'; }"
onFocus="if (box.value=='Search') { box.value=''; }"

onFocus or onClick