Quantcast
Channel: “Uncaught SyntaxError: Unexpected token
Viewing all articles
Browse latest Browse all 2

“Uncaught SyntaxError: Unexpected token

$
0
0

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?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>