Forms question
I'm wondering how the following is done:
I have a single form field for a newsletter subscription, within the code that form field has value="Enter your email".
What im after is, when someone clicks that box to enter their email i would like the 'value' text to disappear instead of making the visitor highlight/delete it themselves before writing their address in.
Anyone know the coding for this?
Thanks
AndyB posted this at 02:31 — 3rd August 2001.
They have: 344 posts
Joined: Aug 1999
modify to suit your variable and form name
disaster-master posted this at 04:58 — 3rd August 2001.
She has: 2,154 posts
Joined: May 2001
Go to Visual Tutorials. They have some good tuts on how to build froms.
http://visualtutorials.com/index.htm
disastermaster
stunnerz posted this at 10:19 — 3rd August 2001.
They have: 8 posts
Joined: Aug 2001
hey, thanks very much for the help u2
cheers
Abhishek Reddy posted this at 11:28 — 3rd August 2001.
He has: 3,348 posts
Joined: Jul 2001
hey,
dunno if you've already got a solution but heres an idea to any other readers:
use the onFocus event to change the value of the textbox. this will not only change it when it is clicked on but also when the user selects the box by using the keyboard (tab).
<input type="text" name="email" size="20" value="your e-mail" onFocus="this.value=''">
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.