I have a checkbox list that I am trying to work through and get the label values for each checked item. I want the values all into one string.
This is what I have
Expand|Select|Wrap|Line Numbers
- function GetCheckboxValues
- {
- var myCRMString;
- for (var n=0; n < document.forms[0].length; n++)
- {
- if (document.forms[0].elements[n].type=='checkbox')
- {
- if (document.forms[0].elements[n].checked)
- {
- myCRMString = myCRMString +" "+ document.forms[0].elements[n].value;
- }
- }
- }
- document.write(myCRMString);
- }
Thanks in advance
Angela (New to programming)