Javascript to change checkbox label

Associate
Joined
28 Apr 2007
Posts
27
Location
Colchester, UK
I've found this page which shows you how to change the checkbox image with javascript for selected checkboxes, but what would be really good would be to change the label properties too - does anyone know of any techniques/sites showing how to do this?

Many thanks
 
jdickerson said:
Some javascript?
Yes like the example link :)

You'll see that the script changes the image for the checkbox, but not the label. I'm looking for a script which changes both the checkbox attributes and the label which is associated with it.

I know the images are set in CSS, but it's the javascript which changes the properties. If the javascript changes the properties of the label associated with the checkbox as well I will define the label properties for both checked/unchecked in CSS the same way as the checkbox itself.
 
Last edited:
danmurf said:
Yes like the example link :)

You'll see that the script changes the image for the checkbox, but not the label. I'm looking for a script which changes both the checkbox attributes and the label which is associated with it.

I know the images are set in CSS, but it's the javascript which changes the properties. If the javascript changes the properties of the label associated with the checkbox as well I will define the label properties for both checked/unchecked in CSS the same way as the checkbox itself.
Apologies for brevity, I meant you could change the active css property by javasciprt.

E.g. http://www.faqts.com/knowledge_base/view.phtml/aid/2147/fid/128
 
Back
Top Bottom