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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:08:28+00:00 2026-06-01T02:08:28+00:00

I am using jQuery UI Selectmenu and am having trouble setting the value of

  • 0

I am using jQuery UI Selectmenu and am having trouble setting the value of a rendered selected. It seems to change the selected option in the underlying select, but the selectmenu does not show the change. I am calling .selectmenu(‘refresh’, true) but nothing happens.

Here is an example: http://jsfiddle.net/sociobit/wYBeL/

  • 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-01T02:08:29+00:00Added an answer on June 1, 2026 at 2:08 am

    Hiya So demo (Solution) http://jsfiddle.net/wYBeL/43/ instead of refresh try .selectmenu("value", selectedValue); OR (Hack) http://jsfiddle.net/wYBeL/36/ (keeps the selectpopup setting of yours 🙂 What ever suits you

    So I checked the DOM using firebug and it seems the selectmenu() style: popup adds extra layer of styling but the #sel2 value is set correctly and you just need to setup the right element with correct value. I reckon refresh will work when you will have an ajax populating a dropdown and refreshing part of page.

    Hmm, you can try looking at API for more details and In case if you don’t need selectmenu popup then without it this will work as well like @jiimw said: (BUt styling goes weird) : http://jsfiddle.net/wYBeL/35/ ;Please let me know if this doesn’t help I will remove post.

    extra link: http://wiki.jqueryui.com/w/page/12138056/Selectmenu

    Hope both helps.

    JQuery Code here

    $(function() {
    
        $('select').selectmenu({
            style: 'popup'
        });
    
        $('#chksame').click(function() {
            if ($(this).is(':checked')) {
                var selectedValue = $('#sel1').val();
                $('#sel2').val(selectedValue);
    
                $('#sel2').selectmenu("value", selectedValue);
    
            }
    
        });
    });​
    

    ** OR **

    $(function() {
    
            $('select').selectmenu({
                style: 'popup'
            });
    
            $('#chksame').click(function() {
                if ($(this).is(':checked')) {
                    var selectedValue = $('#sel1').val();
                    $('#sel2').val(selectedValue);
    
                    // set the right element with the select value
                    $('#sel2-button span').text($("#sel2 option[value='" + selectedValue +"']").text());
    
                    $('#sel2').selectmenu('refresh', true);
    
                }
    
            });
        });​
    

    Cheers

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

Sidebar

Related Questions

We have the following HTML: <option value=4def1b88a1247><a href=link>Text</a></option> When using jquery-ui select menu, the
Using jQuery, how do you check if there is an option selected in a
Im using JQuery UI Selectmenu widget - http://wiki.jqueryui.com/w/page/12138056/Selectmenu Im trying to bind change event.
I have two select lists which are being styled using the jQuery UI Selectmenu
Selectmenu: https://github.com/fnagel/jquery-ui/wiki/Selectmenu I'm using this plugin to style a select menu on a widget
I'm using the jQuery UI Selectmenu Plugin for styling my select fields. Now I
Im using an existing widget from the jquery-ui labs call selectmenu. It has callback
Using jQuery , how can I dynamically set the size attribute of a select
Using jQuery, is there a way to select all tag that reference a specific
I am using ui.selectmenu inside colorbox. It's work well with either, jQuery or colorbox

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.