Link to home
Start Free TrialLog in
Avatar of kfranck
kfranckFlag for United States of America

asked on

How do I code an ASP form so light-font type can appear in a text box?

I have created an ASP form that sends data to access database. In one of the text boxes, I would like to include in the value a few words in light type. I also like the words to disappear when the user enters data into the box. How can this be done and can I adjust the font size of the type?

Here is the code:

<input
                   style="border:2px solid #C7D5F1; BACKGROUND-COLOR: #FFFFFF; font-weight:700"
          name="Staff" size="25" value="Enter STAFF if more than 2"></font><b><font size="2" color="#660000">
                                                            </font></b><font color="#660000">
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Here you go

Carrzkiss

<input onBlur="javascript:if (this.value == '') this.value = 'Your Name';" onFocus="javascript:if (this.value == 'Your Name') this.value='';" value="Your Name" />

Open in new window

Avatar of kfranck

ASKER

Carrzkiss:

Thank you. Do I put this javascript at the top of the page?
ASKER CERTIFIED SOLUTION
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kfranck

ASKER

Great! You're terrific. Thanks.