How to change color of some elements in an HTML form

Manuel

New Member
Based on a selection of a radio button I need to enable or disable a whole list of checkbox options. When the selection calls for a disable I'm using this:\[code\]function radioSelectDNC() { for (i = 3; i < document.addPNtoDNC.elements.length - 1; i++) { document.addPNtoDNC.disabled=true; // this is working document.addPNtoDNC.style.color="blue"; //this line is not working } \[/code\]The disabling works, but the color for the text of the checkbox options is not. It's a long form, but just in case, here's how I'm listing the checkbox options:\[code\] <label><input type="checkbox" name="Campaign" value="http://stackoverflow.com/questions/14451211/Value1">Value1<br></label> <label><input type="checkbox" name="Campaign" value="http://stackoverflow.com/questions/14451211/Value2">Value2<br></label> <label><input type="checkbox" name="Campaign" value="http://stackoverflow.com/questions/14451211/Value3">Value3<br></label>\[/code\]Am I using the right property? Where can I find a list of properties?Oh, and please, just in case, don't give me jQuery. I'm just getting started in this, and every time I search and find jQuery answers my head starts spinning. One of these days.
 
Back
Top