#11201 closed bug (invalid)
jQuery.ajax convert JSONP to HTML
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
There is a short script that I have set up to attempt to fetch HTML cross domain, using jQuery.ajax in hopes of making a cross domain request using JSONP then converting the response to HTML. View source at http://www.jeromecovington.com/convert.html
This would seem to be supported in the documentation for dataType at http://api.jquery.com/jQuery.ajax/
"...multiple, space-separated values: As of jQuery 1.5, jQuery can convert a dataType from what it received in the Content-Type header to what you require. For example, if you want a text response to be treated as XML, use "text xml" for the dataType. You can also make a JSONP request, have it received as text, and interpreted by jQuery as XML: "jsonp text xml." Similarly, a shorthand string such as "jsonp xml" will first attempt to convert from jsonp to xml, and, failing that, convert from jsonp to text, and then from text to xml."
However I am getting the following error logged in Chrome 16 Web Inspector: "Uncaught SyntaxError: Unexpected token <"
I may be misinterpreting the documentation. Please advise.
Change History (2)
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
In the future, please use the forums for support http://forum.jquery.com/using-jquery
Please review: http://api.jquery.com/extending-ajax/