Using jQuery UI's "XML data parsed once" autocomplete. I've checked the feed and it comes out as valid and I even logged it with error() and I get OK 200 for the status and 4 for the readystate (the XML file can be seen below).
http://www.finalfantasyunion.com/includes/xml/games.xml
My jQuery code is:
<script>
$(document).ready(function() {
$.ajax({
dataType: 'xml',
url: '/includes/xml/games.xml',
success: function(xmlResponse) {
var data = $('game', xmlResponse).map(function() {
return {
name: $('name', this).text(),
parsed: $('parsed', this).text()
};
}).get();
$("#category").autocomplete({
source: data,
minLength: 2,
select: function(event, ui) {
alert(ui.item.name);
}
});
},
error: function(xmlResponse) {
console.log(xmlResponse);
}
})
});
</script>
If it makes any difference, this file the above code is loaded in is done via Ajax (basically, I have a page which has a div, which loads in a PHP, which include the above code at the top). But I doubt that has anything to do with this, since the xmlResponse seems to appear fine, just can't seem to figure out why success: isn't firing.