Making a Server Request (^) ❘ 185
// Change the label
$('label[for="addressState"]').text(
xml.find('label').text() + ':'
);
},
'xml'
);
}
);
$('select#addressCountry').click();
}
);
Then for the AJAX requests to succeed, you need to create some XML fi les for the response content.
When you change the country in the
Each XML fi le is structured identically, providing the country’s name, an ISO2 and ISO3
country code, a label, and the list of administrative subdivisions, which I have simply called states,
even though that’s not always technically correct; Canada’s are called provinces and the United
Kingdom’s are called counties.
The preceding example looks like what you see in Figure 7-1, when you select United Kingdom from
the country drop-down.
[http://www.it-ebooks.info](http://www.it-ebooks.info)