<input type= ? >

liunx

Guest
Is there an input type of label?<br />
<br />
I've got a form that displays text field labels in blue indicating prepopulated data. If the user checks a checkbox I need to change the text field labels to red indicating the field is required. <br />
<br />
Thanks<!--content-->Do you mean something like this?<style type="text/css"><!--<br />
label{<br />
color:blue;<br />
}<br />
.required{<br />
color:red;<br />
}<br />
--></style><br />
<br />
<label class="required">Blah: <input type="text" /></label><!--content-->Actually, I have a style sheet where I've defined something similar to what you suggested.<br />
<br />
My form has a checkbox labeled "Drop Ship".<br />
There's also 4 text boxes labeled:<br />
<br />
Address<br />
City<br />
State<br />
Zip<br />
<br />
<br />
The address fields above are prepopulated with data once the form has been loaded. At this point the labels are blue.<br />
<br />
If the user checks the Drop Ship checkbox I need to change the color of the address fields to red.<br />
<br />
If there's a type=label then I thought I could change some properties via javascript to accomplish this. But I haven't found a "label" input type.<br />
<br />
I guess I'll have to use JSP to do it, but that involves a little more thought than I want to do at the moment. :)<!--content-->Well if you want to change the colour of something in JavaScript, give it an ID and do this:<br />
<br />
document.getElementById("the_id").style.color="#ff0000";<br />
<br />
If you show me some code I could tailor make something for ya.<!--content-->
 
Back
Top