I have dynamically generated (From a loop) sets of radio buttons. I am already validating to ensure at least one from each set is selected. However, we have now added a new option (N/A) to each set. All the options are Numeric 1 – 10, and the new option ‘N/A’ is zero (0). I want to check that all the radio button sets are not set to zero (0). At least one set must have a value greater than zero.
What I want to do is to generate a comma delaminated string with all the radio buttons sets names as follows. (I will do this server side with ASP)
strMyRadSets = RadSet_03, RadSet_08, RadSet_22, RadSet_62, RadSet_78, RadSet_152
I now want to pass this string to my validation script to ensure that the accumulated value of selected items of these set are greater than 0.
Something like this ...
RadCheck = document.getElementById(strMyRadSets’).value;
If RadCheck == 0
alert("Error … ");
Thanks in advance