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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:31:14+00:00 2026-05-22T21:31:14+00:00

Possible Duplicate: Check for values in multidimensional input array I’m using a jQuery selector

  • 0

Possible Duplicate:
Check for values in multidimensional input array

I’m using a jQuery selector to look for duplicate tokens in a set of input tags that looks like this:

<ul id="class-items">
 <li>
  <input type="hidden" name="tokens[0][Search_Type]" value="a" />
  <input type="hidden" name="tokens[0][Search_Term]" value="123" />
 </li>
 <li>
  <input type="hidden" name="tokens[1][Search_Type]" value="b" />
  <input type="hidden" name="tokens[1][Search_Term]" value="456" />
 </li>
</ul>

This is my jQuery selector check for duplicate tokens, which doesn’t seem to be working:

if ($('#class-items > li > input[name$="Search_Type"][value="' + searchType + '"] + input[name$="Search_Term"][value="' + searchTerm + '"]').length == 0)

I know that the hidden tokens are adding correctly as I can see from viewing the DOM source.

  • 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-22T21:31:15+00:00Added an answer on May 22, 2026 at 9:31 pm

    Your name attributes do not end with Search_Type and Search_Term.

    They have a ] at the end, so the selector should use Search_Type] and Search_Term], as in:

         // -------------------------------------v
    '#class-items > li > input[name$="Search_Type]"][value="' + 
      searchType + '"] + input[name$="Search_Term]"][value="' + 
      searchTerm + '"]'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: C/C++ check if one bit is set in, i.e. int variable e.g.
Possible Duplicate: Easiest way to find duplicate values in a javascript array How do
Possible Duplicate: Hide select option in IE using jQuery So as you can see
Possible Duplicate: How to check if an array value exists I have a problem
Possible Duplicate: Alphabetic equivalent of PHP is_numeric If you check if the data is
Possible Duplicate: Faster DirectoryExists function? I want to check if some file exists on
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: How to check whether 2 DirectoryInfo objects are pointing to the same
I'm trying to find near duplicate values in a set of fields in order
Possible Duplicate: How to check for equals? (0 == i) or (i == 0)

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.