I\'m creating an iOS / Droid app using AJAX, jQuery, and Phonegap. The backend is a Drupal 7 site serving content via web services. I\'m a little confused about the necessity fo
A JSONP call doesn't work without a callback. The data is loaded in a script
tag, and if the code is not in a form of a method call, the result would just be an object that was discarded, and the success
callback method would never be called.
The ajax
method is adding a callback parameter to the URL even if you don't specify one.
In the documentation, under the "jsonp"
value for the dataType
setting:
"Adds an extra "?callback=?" to the end of your URL to specify the callback."
http://api.jquery.com/jQuery.ajax/