Check/Uncheck Checkbox based on Element Class
Posted: Wed Jul 29, 2015 8:00 pm
Hello,
c# noobie here.
I have a checkbox that does not contain the checkbox attribute and it appears the only difference between checked and unchecked is the element's class.
Checked
<a title="Click to switch between your retirement and pre-retirement views" class="RetirementToggleButton RetirementToggleButtonSprite RetirementSwitch_On" id="RetirementToggleSwitch" href="/lbs/Clix/Clix/UpdateRetirementToggleSwitch"></a>
Unchecked
<a title="Click to switch between your retirement and pre-retirement views" class="RetirementToggleButton RetirementToggleButtonSprite RetirementSwitch_Off" id="RetirementToggleSwitch" href="/lbs/Clix/Clix/UpdateRetirementToggleSwitch"></a>
I would like to get the value of the class and then take action based upon what class is passed through. I am sure I would have to write and IF statement, but I have been struggling to nail it down. I'm thinking this is much easier that I am making it seem to be. Any Suggestions?
Thanks
c# noobie here.
I have a checkbox that does not contain the checkbox attribute and it appears the only difference between checked and unchecked is the element's class.
Checked
<a title="Click to switch between your retirement and pre-retirement views" class="RetirementToggleButton RetirementToggleButtonSprite RetirementSwitch_On" id="RetirementToggleSwitch" href="/lbs/Clix/Clix/UpdateRetirementToggleSwitch"></a>
Unchecked
<a title="Click to switch between your retirement and pre-retirement views" class="RetirementToggleButton RetirementToggleButtonSprite RetirementSwitch_Off" id="RetirementToggleSwitch" href="/lbs/Clix/Clix/UpdateRetirementToggleSwitch"></a>
I would like to get the value of the class and then take action based upon what class is passed through. I am sure I would have to write and IF statement, but I have been struggling to nail it down. I'm thinking this is much easier that I am making it seem to be. Any Suggestions?
Thanks