json object to checked checkboxes
- by webmaster_sean
I have this:
<div id="taglist">
<input type="checkbox" name="chkB1" id="chkB1" value="Mon" /> Monday
<input type="checkbox" name="chkB2" id="chkB2" value="Tue" /> Tuesday
<input type="checkbox" name="chkB3" id="chkB3" value="Wed" /> Wednesday
<input type="checkbox" name="chkB4" id="chkB4" value="Thu" /> Thursday <br />
<input type="checkbox" name="chkB5" id="chkB5" value="Fri" /> Friday
<input type="checkbox" name="chkB6" id="chkB6" value="Sat" /> Saturday
<input type="checkbox" name="chkB7" id="chkB7" value="Sun" /> Sunday
<input type="hidden" name="source_frequency" id="source_frequency" value="" />
</div>
And this:
var days = ["Mon","Tue","Wed","Sun"];
I want the values from days make the corresponding check boxes checked. How would one do such a thing :-)