TextBox onClick

S

skc

You often see some sites that have search fields (text
boxes) that have in here "type in here" or "enter search
word" as the text.

As soon as you click inside the textbox, the box goes
blank and resets to nothing.

How does this occur? Any links on how to do this?

Thanks

skc
 
T

Thomas A. Rowe

It is done with JavaScript. I seen a script a few days ago, but I don't remember the site or what it
was called, as I was looking for something else at the time, but you can try the following in the iE
address bar:

? JavaScript Form Field Scripts

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jon Spivey

Hi,

Modify your body tag to look like this
<body
onload="document.forms[0].FormField.select();document.forms[0].FormField.foc
us();">
Replace FormField with the name of your textbox and then type some text into
the textbox
<input type="text" name="FormField" value="Type Here">
 
Top