checkbox 2 sets.. validations
Posted on 2002-03-12
how wud u validate the following
assume a and b are 2 differnt table having a sets of checkbox
table A has 3 check boxes
table B has 10 checkboxes + select ALL check box which wil check/uncheck all the 10 checkboxes
i am generateing all the 10 checkboxes in a LOOP
<%for i= 1 to 10.....<input type=checkbox name=check<%=i%>><%next%>
my validation needed here is of 2 types:
1).if i select ALL in Table B ,i shud be able to choose only one checkbox in Table A
i choose ALL and i choose 1 in Table A.now if i try to check on 2 in table A its shud alert.."oops no multiple checking allowed for this combination"
vice versa must also be true i.e if i chose checkbox 1,3 in table A i shud NOT be able to check ALL in Table B
2).if i select more than 1 check box in Table B ,i shud be able to select only one chekbox in table A
if i choose check box 2 and checkbox 7 in table B and i chose checkbox 2 in Table A.now if i try to check on checkbox 1 in table A its must alert me in same way
it shud be true vice versa also
assume this as a mock template.
hope i made it clear....
thanks in advance folks