Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is a working example of jsonp cross domain</p> <p><a href="https://stackoverflow.com/questions/2681466/jsonp-with-jquery">jsonp with jquery</a></p> <p>Is that what you are looking for?</p> <p>If you have requested with query string</p> <pre><code> ?callback=my_callback_method </code></pre> <p>then, your server must response data wrapped like this:</p> <pre><code>my_callback_method({your json serialized data}); </code></pre> <p>see: <a href="https://stackoverflow.com/questions/11736431/make-cross-domain-ajax-jsonp-request-with-jquery">Make cross-domain ajax JSONP request with jQuery</a></p> <p>Hopefully this will work if your json is fine.</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;JSONP example&lt;/title&gt; &lt;script src="http://code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;test jsonP&lt;/h1&gt; &lt;script&gt; var url = 'http://widget.mondialrelay.com//parcelshop-picker/v3_0/services/parcelshop-picker.svc/SearchPR?Brand=BDTEST%20%20&amp;Country=FR&amp;PostCode=62620&amp;ColLivMod=24R&amp;Weight=&amp;NbResults=7&amp;SearchDelay=&amp;SearchFar=75&amp;=Zone_Widget&amp;VacationBefore=&amp;VacationAfter=&amp;Service=&amp;Latitude=&amp;Longitude=&amp;method=jQuery16206304910685867071_1380876031038&amp;_=1380879686732?callback=?'; $.ajax({ type: 'GET', url: url, async: false, jsonpCallback: 'jQuery16206304910685867071_1380876031038', contentType: "application/json", dataType: 'jsonp', success: function(json) { console.dir(json.PRList); }, error: function(e) { console.log(e.message); } }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload