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 6055069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:13:23+00:00 2026-05-23T08:13:23+00:00

I’m after a little help with a complicated (for me!) jquery statement… Basically I

  • 0

I’m after a little help with a complicated (for me!) jquery statement…

Basically I have a questionnaire, with 30 questions.
Each question (in a table row) is made up of a group of 5 radio buttons.
However, for some questions, as well as the radio group, there is also a select box – for this question to be ‘complete’ the select box needs to have a value selected (the first option having an empty value) as well as a radio selected.

OK – so I want to show how many questions have been completed – or how many are left to do…

So I need to count up each row considered ‘complete’ – in pseudo, something like

count the number of rows with
radio buttons and one of those radios selected
but remove any row which also has a select box, if that select box hasnt had an option chosen

Hope that makes sense…

I can get all the questions where there are unselected radios –

var unanswered = $('#myTable tr:has(:radio):not(:has(:radio:checked))').length;

or kill the not to count those rows with selected radios, but the select boxes are killing me. Just can’t seem to grab hold of those rows with an unselected select box, not to mention combining it with the radio part!

Any help very very appreciated!

Thanks, Calvin

  • 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-05-23T08:13:24+00:00Added an answer on May 23, 2026 at 8:13 am
    var unanswered2 = $('#myTable tr:has(option):not(:has(option[value!=""]:selected))').length;
    

    ^Get all tr with option‘s but not those which have empty value and are selected. (Not tested on animals).

    edit: I have add !.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.