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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:39:23+00:00 2026-06-14T19:39:23+00:00

I am trying to integrate jquery-chosen jquery-chosen into my application. I have two select

  • 0

I am trying to integrate jquery-chosen jquery-chosen into my application.

I have two select controls: when a user selects an option from the first one, the second one updates dynamically (through jQuery) according to the value selected from the first one (classic cascading selects).

It is in the second select control that I wish to use jquery-chosen.

Here is my js:

$(document).ready(function() {
    $(".chzn-select").chosen();
});

$(document).ready(function() {
    var geolocationRegionSelect = $("#geolocationRegionSelect");//first select control
    geolocationRegionSelect.bind('change', function(event) {
        $.get("/kadjoukor/geolocations/findDepartmentsByRegion?regionId="+$(this).val(), function(result){
            console.log(result);        
            var geolocationDepartmentSelect = $("#geolocationDepartmentSelect");//second select control
            geolocationDepartmentSelect.empty();
            $.each(result, function() {
                geolocationDepartmentSelect.append($("<option />").val(this.id).text(this.department));
            });
        }, 'json');
        $("#geolocationDepartmentSelect").trigger("liszt:updated");
    });
});

Here is the html for the second control:

    <div class="controls">
        <select id="geolocationDepartmentSelect"  data-placeholder="Choose a department" multiple="multiple" class="chzn-select chzn-done"></select>
    </div>

I noticed that using jquery-chosen on a statically populated select works fine. It is only with my dynamically populated select (the second one) that I can’t get jquery-chosen to work.

I tried to use the trigger function as documented in the jq-chosen page:

Updating Chosen Dynamically

If you need to update the options in your
select field and want Chosen to pick up the changes, you’ll need to
trigger the "liszt:updated" event on the field. Chosen will re-build
itself based on the updated content.

It does not work for me unfortunately…

EDIT: I must also mention that the chosen control just renders as a plain html multiple select when the page is loaded.

  • 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-14T19:39:24+00:00Added an answer on June 14, 2026 at 7:39 pm

    I changed the select control to:

    <select id="geolocationDepartmentSelect"  data-placeholder="Choose a department" multiple="multiple" class="chzn-select"></select>
    

    and the js to:

    $(".chzn-select").chosen({no_results_text: "No results matched"});
    

    and

    $(".chzn-select").trigger("liszt:updated");
    

    and the issue is gone.

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

Sidebar

Related Questions

I have a problem. I'm trying to integrate jQuery address http://www.asual.com/jquery/address/ into my website.
I have a problem. I'm trying to integrate jQuery address http://www.asual.com/jquery/address/ into my website.
I've been trying to integrate the jQuery UI Datepicker into our ASP.NET WebForms application.
I am trying to integrate the Jquery UI select menu, in my wordpress site.
I'm trying to integrate CSS pagination into a thumbnail gallery I have set up
I am trying to integrate refinerycms into an existing application. Here is my gemfile
I'm trying to integrate jQuery and the Cycle plugin with an existing application. However,
Hi I am trying to integrate a jquery gallery into my wordpress theme.The gallery
I am trying to integrate iScroll in my application using javascript-jquery.mobile.iscroll plugin . I
I'm trying to integrate Video4Linux in my managed application. Indeed I've declared all required

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.