Hi friends this is my form.I want to achieve this "when I select particular country(optionset),I want to display states(optionset) which belongs to the selected country".I am calling countries api.I am getting list of countries as response in alert.I want to set country values to the country field(option set).I tried but it was not working.

here is my code
==================
function countries()
{
var BATTUTA_KEY="00000000000000000000000000000000"
$.getJSON("battuta.medunes.net/.../all"+BATTUTA_KEY+"&callback=?").success(function(countries){
console.log(countries);
for (var i in countries)
{
//alert(countries[i].name);
var con=countries[i].name;
alert(con);
}
});
}
I hope I will find solution from you people.Thank you.
*This post is locked for comments
I have the same question (0)