Fill a select option from json with jquery


Fill a select option from json with jquery


I need qjuery feed cities based on country of selection. I did it programmically but have no idea how to put JSON data into the select box. Currently, the code i have written doesnt want to output the following:Select 1: option selected firstSelect 2: checks jSon file, finds first and all of the nodes(second jqufry and list them. This JSON data could be served as a result of a webserver API request or simply a JSON text file located on your host machine.

The first one has three options. The first just informs the user to select an option, and the next two are actual choices. The second select only has one option telling the user to please pick from the first dropdown first. The options in the second dropdown will be dynamically replaced. I am using an ASP.NET web application and page methods to perform the Ajax calls. Using page methods means that you do not need a seperate web service, which is good if the functionality is specifically for the page.

Each list is given a unique ID to be able to ref.




Fill a select option from json with jquery

Option json select a fill with jquery from

Option json select a fill with jquery from



Add a comment

Your e-mail will not be published. Required fields are marked *

« Previous records « Next records