I\'m trying to load an external page using JSONP
, but the page is an HTML
page, I just want to grab the contents of it using ajax.
EDIT: T
http://en.wikipedia.org/wiki/JSONP#Script_element_injection
Making a JSONP call (in other words, to employ this usage pattern), requires a script element. Therefore, for each new JSONP request, the browser must add (or reuse) a new element—in other words, inject the element—into the HTML DOM, with the desired value for the "src" attribute. This element is then evaluated, the src URL is retrieved, and the response JSON is evaluated.
Now look at your error:
Uncaught SyntaxError: Unexpected token <
<
is the first character of any html tag, probably this is the start of
And NO, you can't use JSONP for fetching html data.