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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:28:40+00:00 2026-06-09T13:28:40+00:00

I think it’s timing issue or something. Elements of combobox are gotten from ajax

  • 0

I think it’s timing issue or something. Elements of combobox are gotten from ajax call and if I use selectmenu, knockout data-bind does not get those elements to the combobox. If I comment out, however,

 $("select").selectmenu();

everything is working fine. I used following code

    function ViewModel() {
        // Data
        var self = this;
        self.loaded = ko.observable(false);
        self.groups = ko.observableArray([]);
        //....
        $.getJSON("api/groups", self.groups)
            .done(function () {
                self.loaded(true); $('select').selectmenu('refresh', true);
            });
    }
    ko.applyBindings(new ViewModel());
    $(document).ready(function () {
        // Handler for .ready() called.
        $("select").selectmenu();
    });        

and this html

    <div>Active Group:&nbsp; <select data-bind="options: groups,
                  optionsText: 'Name',
                  optionsValue: 'Id',
                  value: selectedGroupId,
                  optionsCaption: 'Choose a group'"></select></div>

When document is ready, the combobox has single element of “Choose a group”. I verified data is getting OK with Firebug. Is there any way to resolve this problem?

  • 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-09T13:28:42+00:00Added an answer on June 9, 2026 at 1:28 pm

    I think you need custom binding with events of selectmenu. Please refer to following.

    http://knockoutjs.com/documentation/event-binding.html

    Knockout and jQuery Mobile: Binding data to select lists

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

Sidebar

Related Questions

I think what I need is something the .net folks call transparent dynamic proxy,
Think about the games like Spiral Knights and Minecraft(Which I believe both use LWJGL)
Think of the following code: static int Main() { byte[] data = File.ReadAllBytes(anyfile); SomeMethod(data);
I think I'm missing something basic here. Why is the third IF condition true?
Think you are the proud owner of Facebook, then which data you want to
I think I'm missing something basic here. Any explanation or pointers to previously asked
I think i'm going crazy, as this seems like an incredibly easy issue to
I think I should use a regexp to match content in my file. I
Think of a dictionary application that grabs words upon user's click from any other
I think I understand that it is a copy of the object/data member passed

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.