liamC
Member
Registered: 28th Feb 04
User status: Offline
|
I have a text field which says '--Enter your Email Address--' in the text field when the page is first loaded.
When the user clicks in the box I want the '--Enter your Email Address--' text to disappear.
At the moment it just stays in and I have to delete it before typing the email address.
Does anyone know how to make the text disappear once it is clicked on?
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
You need to use Javascript.
http://www.yourhtmlsource.com/forms/clearingdefaulttext.html
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
Cheers fella - looking into it now
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
code: <input type="text" id="tx" name="tx" value="click" onclick="this.value='';"/>
should work
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
quote: Originally posted by Dom
code: <input type="text" id="tx" name="tx" value="click" onclick="this.value='';"/>
should work
Also spot on and works for my text area where the javascript one doesn't. Cheers!
|