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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:18:14+00:00 2026-06-08T21:18:14+00:00

I have a two drop downs namely Min Price and Max Price , i

  • 0

I have a two drop downs namely Min Price and Max Price, i want to change the second drop-down value based on the first selection.

Say example 1st drop-down selection is 100 means, 2nd drop-down value should be greater than the 100, if it is 200 in 1st, value of 2nd should be greater than 200

Any idea in jQuery or js?

  • 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-08T21:18:15+00:00Added an answer on June 8, 2026 at 9:18 pm

    Simplest i could think of ( this allows you to go back in your choices, you can select 400 and then 200 and everything works )

    <select id='min'>
    <option value='100'>100</option>
    <option value='200'>200</option>
    <option value='300'>300</option>
    <option value='400'>400</option>
    </select>
    <select id='max'>
    <option value='100'>100</option>
    <option value='200'>200</option>
    <option value='300'>300</option>
    <option value='400'>400</option>
    </select>​
    
    var removed;
    
    $('#min').change( function() {
        var value = this.value;
        $('#max').prepend(removed);
        var toKeep = $('#max option').filter( function( ) {
            return parseInt(this.value, 10) >= parseInt( value, 10);
        } );
        removed =  $('#max option').filter( function( ) {
            return parseInt(this.value, 10) < parseInt( value, 10);
        } );
        $('#max').html(toKeep);
    });​
    

    http://jsfiddle.net/NjLNF/2/

    EDIt – added parseInt() as per comment

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

Sidebar

Related Questions

I have two drop down lists. Second one is populated based on value chosen
In my application i have two drop down boxes first box had origin second
I have two Drop Down Lists, the second ones are based off which one
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
I have two dropdowns in extjs,based on the first dropdwon,the second dropdown populates.This is
I have a drop-down list box and two text fields of id values namely
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have
I have two drop down. SelCurrentManuf and selCurrentModel. I want the option in selCurrentModel
I have two drop down list on a page. The first one list projects
I have two drop down lists , list1, list 2. I want it to

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.