jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox How to initialize the text when using a json adapter?

This topic contains 0 replies, has 1 voice, and was last updated by  spekary 12 years, 3 months ago.

Viewing 1 post (of 1 total)
  • Author

  • spekary
    Member

    What is the recommended way to initialize the label and value in a combobox with a json adapter that does its own filtering? For example, in your combobox remote search demo, lets say you detected and saved that the user selected “Berlin”, and the next time the user comes to the page, you wanted to put the word “Berlin” into the combobox so that the user can see what they entered the last time. How do you do that?

    Using val() or selectedIndex doesn’t work, because there are no items loaded yet. Besides, selectedIndex isn’t guaranteed to point to the same item, and I think its dependent on what items are currently filter anyway, correct?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.