Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: default text on external file
08-20-2008, 11:12 PM #1
- Join Date
- Apr 2008
- NEW YOrk
- Thanked 0 Times in 0 Posts
default text on external file
I'm having a issue because I need to add a default text in a input field. The problem is that I know how to do it on inline stile, but no idea how to do it external...
This is what I have:
<input type="text" name="myfield" value="Type Your Name" onclick="clickclear(this, 'Type Your Name')" onblur="clickrecall(this,'Type Your Name')" />
OnClick the link value should disappear only when is 'Type Your Name'
08-20-2008, 11:33 PM #2
I would also suggest changing your function that clears the text from being on click to onfocus because main user use the tab button to navigate forms or even the entire page.Code:document.formname.elementname.value = 'type your name';
Code:<input type="text" name="myfield" value="Type Your Name" onfocus="clickclear(this, 'Type Your Name')" onblur="clickrecall(this,'Type Your Name')" />
08-20-2008, 11:36 PM #3
- Join Date
- Dec 2004
- In a place far, far away...
- Thanked 1,043 Times in 1,019 Posts