JavaScript Question

Results 1 to 2 of 2

Thread: JavaScript Question

  1. #1
    Join Date
    Dec 1969

    Default JavaScript Question

    I have few Check Boxes on the form and 3 radio buttons say 1, 2, 3. When they select any one of them minimum 6 Check boxes need to be selected, otherwise it should pop up saying that minimum 6 checkboxes need to be selected, how do i do this.<BR><BR>Thanks for any suggestion.

  2. #2
    Join Date
    Dec 1969

    Default RE: JavaScript Question

    Use the OnFocus event , on each check boxes. and call a js function.<BR>inside that put a counter to count the number of checkboxes checked.<BR>like<BR>function check()<BR>{<BR>if document.form.checkbox.checked = true<BR>{<BR>counter=counter+1<BR>if counter &#060;6 <BR>alert("you should chck atlest 6 options")<BR>document.form.checkbox.focus();<BR>re turn(false);<BR>}<BR>}<BR>It&#039s not neat, just a rough example though. modify accordingly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts