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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:28:57+00:00 2026-05-31T13:28:57+00:00

How can I refresh jquery multiselect when the last option is selected with new

  • 0

How can I refresh jquery multiselect when the last option is selected with new values? Like I have the below options in my multiselect:

<select id="positions" multiple="multiple">
    <option value="0">Programmer</option>
    <option value="1">Tester</option>
    <option value="2">Manager</option>
    <option value="3">Admin</option>
    <option value="4">Load all other</option>    
</select>

If the user selects the “load all other” option from the multiselect box, then this multiselect should be reinitialized with different values.

<select id="positions2" multiple="multiple">
    <option value="0">test1</option>
    <option value="1">test2</option>
    <option value="2">test3</option>
    <option value="3">test4</option>    
</select>

Above is the resultant options that the multiselect will have after selecting load all other option

  • 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-31T13:28:58+00:00Added an answer on May 31, 2026 at 1:28 pm

    There are many ways you can do this. Off the top of my head I would use the html function. Set an id to the option that needs to clicked and add an event handler to it. Would you like me to write the code for you?

    UPDATE

    This will replace the code in the first select. If you simply want to hide it and add a new select element then use the show/hide function. Dont forget to add id="option" attribute to the option that needs to be clicked.

    UPDATE – I have added comments to help you understand what the script is doing

    // Set the click event of the option (change '#option' to the options id)
    $('#option').click(function(){
        // Alter the HTML content of the select
        $('#positions').html('<option value="0">test1</option><option value="1">test2</option><option value="2">test3</option><option value="3">test4</option>');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone just help me refresh my mind? How do you specify hex values
New question, but really close to need to refresh page in jquery mobile .
I'm new to jquery and was wondering if someone can help me with, what
I would like to use jQuery to refresh a partial on a page, but
I have loaded a page into div using jQuery. But when i refresh the
I have tricky problem which I can't completely understand. It's jQuery tabs with cookie
How can I detect window/browser size with jQuery like Gmail? In Gmail, we don't
How can I refresh or reload a form using JQuery? I am filling my
I have researched and researched and I am trying to use jquery to refresh
How can I programmatically refresh Visual Studio Solution Explorer? I can get a hold

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.