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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:04:19+00:00 2026-05-24T16:04:19+00:00

Is it possible to filter specific select options? I have a code : <select

  • 0

Is it possible to filter specific select options?

I have a code :

<select id="adcategory" name="adcategory">
    <option value="">Select</option>
    <option value="25" class="dropdownparentcategory">Florida Atlantic University</option>

    <option value="26">- Books </option>
    <option value="27">- Electronics</option>
    <option value="28">- For Rent</option>

    <option value="17" class="dropdownparentcategory">Florida International University</option>

    <option value="18">- Books</option>
    <option value="19">- Electronics</option>
    <option value="20">- For Rent</option>

    <option value="1" class="dropdownparentcategory">Florida Tech</option>
    <option value="2">- Books</option>
    <option value="3">- Electronics</option>
    <option value="7">- For Rent</option>


</select>

So if the variable for example $school = Florida Atlantic University than show only thoes options witch is till next school category ( .dropdownparentcategory ), so in this case they would be only :

<select id="adcategory" name="adcategory">
    <option value="">Select</option>

    <option value="26">- Books </option>
    <option value="27">- Electronics</option>
    <option value="28">- For Rent</option>

</select>

As you can see in this image :

enter image description here

Is it possible to create with jQuery?

  • 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-24T16:04:20+00:00Added an answer on May 24, 2026 at 4:04 pm

    This looks like potentially bad design. I would suggest moving to <optgroup> [MDN] tags to group your drop down items:

    <select>
        <optgroup label="Florida Atlantic University">
            <option value="1">Text</option>
            <option value="2">Text</option>
            <option value="3">Text</option>
        </optgroup>
        <optgroup label="Florida Tech">
            <option value="4">Text</option>
            <option value="5">Text</option>
            <option value="6">Text</option>
        </optgroup>
    </select>
    

    Then it’s trivially easy to select child elements;

    $('optgroup[label*="' + yourSchoolName + '"]').find('option')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Gallery with folder filter I'm using following code to open a gallery
Is it possible to filter the contents of a Listbox in a Windows Forms
Possible Duplicate: How do you implement a good profanity filter? I am developing a
Is it possible to write a servlet filter to take inspect HTTP response codes?
Is it possible to create a filter in a Drupal 6 View that is
Possible Duplicate: How does the Google Did you mean? Algorithm work? Suppose you have
In Eclipse (Galileo) is it possible to filter the list of TODO and FIXME
is that possible to hide specific nodes in VirtualStringTree? I'm implementing filtering feature (the
Consider the following class structure: class Filter { virtual void filter() = 0; virtual
I have written a transform filter (a video codec) that works well in graph

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.