I have a getJSON call that works fine in FF, but bugs in IE.
I get no data. :(
So i want to see what the plaintext is that's returned in the success
callback..
Using the new 1.3 jQuery, btw..
code:
var rc = $('select#regions_countries')[0];
var rr = $('select#regions_regions')[0];
var url =
'http://www.myhost.com/members/ajax_fetch_regions_for_countries.php';
var countries = [];
for (var i=0; i<rc.options.length; i++) {
if (rc.options[i].selected) {
countries[countries.length] = rc.options[i].text;
}
};
$.getJSON (url, {countries:countries.join('|-|')}, function (data, ts) {
var regions = data.regions.split('|-|').sort();
var html = '';
for (var i=0; i<regions.length; i++) {
html+='<option
value="'+regions[i].replace(/\s\(.*\)/,'')+'">'+regions[i]+'</option>';
}
rr.innerHTML = html;
});