0

I'm trying to parse XML with jQuery, and I'm having issues doing so. I'm using this from a proven function, and it keeps skipping the ajax part. I can't for the life of me find out why I'm unable to run this.

$(function () {
    $.ajax({
        type: 'POST',
        url: 'http://my.domain.tld/php/myapi.php', // the script to call to get data          
        data: "method=get_tbl_fields", // you can insert url argumnets here to pass to api.php, for example "id=5&parent=6"
        dataType: 'xml', // data format      
        success: function(xml) { //on recieve of reply
            alert('it worked');
        }
    });
});
jabclab
  • 14,786
  • 5
  • 54
  • 51
Spencer Cole
  • 1,122
  • 1
  • 10
  • 20

1 Answers1

0

This was solved by changing from my local host wamp server to the actual webserver in a development platform. The API wasn't letting me query from my localhost.

Spencer Cole
  • 1,122
  • 1
  • 10
  • 20