I have googled this option for many days but I couldn\'t find a solution.
What I want is:
You have a script ("/getCities.php") that takes a parameter ("country") that is the ID of the country you want the cities of and outputs JSON that looks like this:
{"Cities":
[
{
"ID": 1,
"Name": "New York"
},
{
"ID": 2,
"Name": "Los Angeles"
}
]}
(You can use JSONLint to validate your JSON.)
Then maybe something along these lines: