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

  • Home
  • SEARCH
  • 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 8699741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:01:25+00:00 2026-06-13T02:01:25+00:00

Here is my fiddle I have no issue validating the first 3 text inputs,

  • 0

Here is my fiddle

I have no issue validating the first 3 text inputs, however when my validation gets to the check boxes and radio buttons, it only validates one check box and one radio button, rather than looping back through and re-checking each box/button.

So if I only enter the first radio button and the first check box, it allows submission. Also if I enter a checkbox and hit submit, there are no popups asking that I fill in the other check boxes, I have the same issue with the radio buttons, if I enter one of the radio buttons, it only alerts me to fill in check boxes and leaves out the other radio buttons.

What do I need to change in my loop counter? Any assistance is appreciated, thanks!!!

  • 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-13T02:01:27+00:00Added an answer on June 13, 2026 at 2:01 am

    the problem is in this two row

    if (inputName.length > 0) if (element.name == inputName) returnValue++;
    else returnValue++
    

    now is executed like this

    if (inputName.length > 0) {
        if (element.name == inputName) { 
            returnValue++;
        } else {
            returnValue++
        }
    }
    

    i think you need to wrap the ifs with brackets

    if (inputName.length > 0) {
        if (element.name == inputName) { 
            returnValue++;
        }
    } else {
        returnValue++  // i kept this but don't understand what it means...
    }
    

    EDIT:

    i updated your fiddle and this work as expected

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fiddle here http://jsfiddle.net/WULsZ/1/ I load jQuery first and the code is
I have created fiddle here: http://jsfiddle.net/ozzy/WEGMh/ How it should look is here: Issue is
Here's a live demo of the issue on JS Fiddle. I have some jquery
I have a fiddle here - http://jsfiddle.net/hhimanshu/SDr3F/2/ The left pane is already available I
I have an XML file that is validating against a schema. However on our
I have some HTML code. Here is a link to a fiddle with a
I have a text input with a set height and padding however the padding
I have a custom check box. The issue I have is , on hover
I have an issue with a jquery script using text node to find and
So here is the issue, I have 6 divs that are using jQuery UI

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.