0

I am having some trouble verifying that a set of radio buttons are checked.I need my form to be able to check if one of its radios are checked.

}else if(question_pos==6){
        if(($('input[name=baseline_20]:checked') || $('input[name=baseline_21]:checked') )) {
        return true;
    }else{
        return false;
    }

I need it so that baseline_20 is verified checked if any one of its children radios are checked, exe baseline20_0, baseline20_1 and so on..., or baseline20_0, baseline20_1... The form that it is in is called form6.

user2089255
  • 87
  • 2
  • 12
  • have a look http://stackoverflow.com/questions/277589/validation-of-radio-button-group-using-jquery-validation-plugin – Sachin Apr 02 '13 at 20:04
  • Have you tried `is()`? Something like: `if($("input[name='baseline_20']").is(":checked") || $("input[name='baseline_21']").is(":checked"))` – faino Apr 02 '13 at 20:05
  • Can you post yout HTML code? – Floremin Apr 02 '13 at 20:05

1 Answers1

1

did you tired this

$("input[name='baseline_20']:checked").length > 0
Mohamed Habib
  • 883
  • 1
  • 8
  • 18
  • Thank you quite much. I still do not consider myself to be a java-script of jquery programmer. I actually don't really know what I am doing, but I Love' learning how to do new things! – user2089255 Apr 03 '13 at 16:14