I am trying to pull a password protected xml feed from another website, but I am getting the following error:
"Uncaught SyntaxError: Unexpected token <"
I fixed the origin access error that I was getting previously by adding a callback function, but now I am getting this uncaught syntax error.
My code is:
$.ajax({ url: 'http://xxx.php?&callback=?', dataType: 'jsonp', type: 'POST', username: 'xxxxx', password: 'xxxxx', crossDomain : true, xhrFields: { withCredentials: true }});
When I inspect the error I can just see 'denied' where the feed should be: screen shot of error
Any ideas why this is not working? Do I need to request something from the feed provider? Or is there something missing/incorrect in my code?