Is there some type of plugin to do this? The server will return JSON content containing the option labels and values.
I can do this manually, I just wanted to see if there was an easier way.
Is there some type of plugin to do this? The server will return JSON content containing the option labels and values.
I can do this manually, I just wanted to see if there was an easier way.
Loop through the json and do this on each text/value pair (works cross-browser nicely):
I literally just loop though the items in the list, and generate the html, before inserting the html into the element. There is probably a plugin now you mention it.
Or something similar
I use javascript, jQuery and AJAX way to update the select box with JSON data in the following way. Its pretty clean and concise and does the job perfectly.