Note that there are some explanatory texts on larger screens.

plurals
  1. POgetJSON callback QueryString Param Issue
    primarykey
    data
    text
    <p>This works fine:</p> <pre><code> $.getJSON("http://localhost:59396/xxxWeb/ CarouselHandler.ashx?action=getproducts&amp;ids=" + ids, function(data) { carousel.size(allProductIDs.length); if (numberOfImagesLeftToShow &lt; numberOfImagesToDisplay) { first += (numberOfImagesToDisplay - numberOfImagesLeftToShow); } var d = 0; for (var i = first; i &lt;= last; i++) { if (d != undefined) { // add data using index of the array returned by JSON (which starts at 0) carousel.add(i, decode(data[d].ImageTag)); } // set to last ProductID showing in Carousel if (i == last) { lastProductID = parseFloat (data[d].ProductID); } d++; } } ); </code></pre> <p>This does not work, I get no pictures rendered after trying to add the &amp;format=json&amp;jsoncallback=? :</p> <pre><code> $.getJSON("http://localhost:59396/xxxWeb/ CarouselHandler.ashx?action=getproducts&amp;ids=" + ids + "&amp;format=json&amp;jsoncallback=?", function(data) { carousel.size(allProductIDs.length); if (numberOfImagesLeftToShow &lt; numberOfImagesToDisplay) { first += (numberOfImagesToDisplay - numberOfImagesLeftToShow); } var d = 0; for (var i = first; i &lt;= last; i++) { if (d != undefined) { // add data using index of the array returned by JSON (which starts at 0) carousel.add(i, decode(data[d].ImageTag)); } // set to last ProductID showing in Carousel if (i == last) { lastProductID = parseFloat (data[d].ProductID); } d++; } } ); </code></pre> <p>Same for here, calling to our dev server.</p> <pre><code>$.getJSON("http://xxxdev/xxx/CarouselHandler.ashx? action=getproducts&amp;ids=" + ids + "&amp;format=json&amp;jsoncallback=?", function(data) { </code></pre> <p>No idea why. No errors, nothing. The data received back is no different then the first example when I was calling localhost. So it's valid JSON, that's not the issue here. It's that my function(data) is not being fired when I intruduce the querystring param. Without it, it works fine and function(data) is called.</p> <p>Adding a "&amp;jsoncallback=?" or "&amp;callback=?" got rid of the Access to restricted URI denied" code: "1012 but I get no data showing in my plug-in when adding either of those querystring params to my url. So I don't get it. I thought that it's supposed to automatically replace ? with function(data) in my case?? Do I need to send something back in the response or something?? I ask because certain APIs such as yahoo require an _ in front. But so does this mean I also need to supply something in my json response? I thought all you need to do is just add the callback param in your request. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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