Hello all, I'm trying to load XML file after a selectable is clicked. Everything goes fine except it never executes any codes within
$('occupancy',theXML).each(function(i) { alert("never executes"); });
Can someone please advise me? Here is the rest of the code:
$("#selectable").selectable({
selected: function(){
$(".ui-selected", this).each(function(){
$oid = $(this).attr('name'); // everything here executes fine
});
$.get("occupancy/xmlInfoForm.php", { oid: $oid }, function(theXML) {
// chrome debug shows that it loads the right XML with right oid, but never executes the alert below
$('occupancy',theXML).each(function(i) {
alert(theXML) // this is the alert that never executes
});
});
}
});