bluemonster7754
06-21-2005, 03:25 PM
Hello Javascript gurus! I have a problem. I have a table that has three rows of six checkboxes. Each row of checkboxes has the same name, but has different IDs. For example, Row 1 names and IDs would be:
input type=checkbox value="1" id="V42_1" name="V42"
input type=checkbox value="2" id="V42_2" name="V42"
and so on...
input type=checkbox value="6" id="V42_6" name="V42"
How would I be able to disable the second checkbox if the first checkbox is checked? This would be same the second pair of checkboxes as well. I am trying to guide users in answering certain questions that are relevant to each response in a survey that I am developing. This would also prevent the user from answering the same question twice and thus giving me an inflated data set to sift through in the end while I am doing my analysis. I thought checkboxes would be a better choice than radio buttons because it would prevent users from thinking they just have to answer one question instead of answering three per line...
I was think something to the effect of referencing their IDs with an array, but I am not sure how to accomplish this. If this is not clear, feel free to reply back for detail. Please help!
Thank you in advance!
input type=checkbox value="1" id="V42_1" name="V42"
input type=checkbox value="2" id="V42_2" name="V42"
and so on...
input type=checkbox value="6" id="V42_6" name="V42"
How would I be able to disable the second checkbox if the first checkbox is checked? This would be same the second pair of checkboxes as well. I am trying to guide users in answering certain questions that are relevant to each response in a survey that I am developing. This would also prevent the user from answering the same question twice and thus giving me an inflated data set to sift through in the end while I am doing my analysis. I thought checkboxes would be a better choice than radio buttons because it would prevent users from thinking they just have to answer one question instead of answering three per line...
I was think something to the effect of referencing their IDs with an array, but I am not sure how to accomplish this. If this is not clear, feel free to reply back for detail. Please help!
Thank you in advance!