Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8303037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:25:47+00:00 2026-06-08T17:25:47+00:00

I am trying to validate checkboxes in a form. my form is as follows:

  • 0

I am trying to validate checkboxes in a form.

my form is as follows:

<form name="results" action=request_job.php method="post" 
onsubmit="return validateForm.apply(this)">
<td name='checkb'colspan='2' class="noborder" width='100%' align="center">
                <input type='checkbox' name='ModelArray[]' value='1'>m1
                                    <input type='checkbox' name='ModelArray[]' value='2'>m2
                                    <input type='checkbox' name='ModelArray[]' value='3'>m3
                                    <input type='checkbox' name='ModelArray[]' value='4'>m4
                                    <input type='checkbox' name='ModelArray[]' value='5'>m5
                                    <input type='checkbox' name='ModelArray[]' value='6'>m6
                                    <input type='checkbox' name='ModelArray[]' value='7'>m7

I want to there to be an alert if there is no checkboxes selected.
How do i do this. I have being trying a long time now.

Thanks

solved with this:

var wrap=doc.get("checkb");
ArrCB=wrap.getelementbyTagName('input');
ArrCB_l=ArrCB.lenght();
while(ArrCB_l--){
  var CB=ArrCB[ArrCB_l];
  CB.checked()==True;
return 1
}
return 0

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:25:49+00:00Added an answer on June 8, 2026 at 5:25 pm
    var wrap=doc.get("checkb");
    ArrCB=wrap.getelementbyTagName('input');
    ArrCB_l=ArrCB.lenght();
    while(ArrCB_l--){
      var CB=ArrCB[ArrCB_l];
      CB.checked()==True;
      return 1
     }
     return 0
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to validate two checkboxes. One of them must be checked in
While trying to validate form data on my page i get the following error:
I am trying to validate an html form using javascript the code is bellow
I'm trying to validate a form using the validate plugin for jquery. I want
I have an issue cropping up in a form I'm trying to post. In
I'm trying to validate a form filed via javascript. The idea is that the
I am trying to validate a date in PHP but I am getting an
I am trying to validate this form before it is submitted to the order
I am trying to validate a form with a couple of elements being required
I am currently trying to validate a form server side, the way it works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.