Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You have to use check browser and version for IE8+, then use the XDomainRequest() if msie8+.</p> <p>This will return a JSON String, must use jQuery.parseJSON() to create the JSON object…</p> <p>Don't use getJSON!</p> <p>Here's my example:</p> <pre><code>if ($.browser.msie &amp;&amp; parseInt($.browser.version, 10) &gt;= 8 &amp;&amp; window.XDomainRequest) { // Use Microsoft XDR var xdr = new XDomainRequest(); xdr.open("get", reqURL); xdr.onload = function() { var json = xdr.responseText; json = $.parseJSON(json); $.each(json.results, function(i, val) { console.log(val.formatted_address); var locString = val.formatted_address; $.each(val.address_components, function(x, comp) { if($.inArray("postal_code", comp.types) &gt; -1) { //alert("___" + comp.types); zipmap[locString] = comp.short_name; } }); suggestions.push(val.formatted_address); }); //alert(json.results); } xdr.send(); add(suggestions); }else { $.getJSON(reqURL, function(data) { var isZIP = new Boolean; console.log(data.results); $.each(data.results, function(i, val) { console.log(val.formatted_address); var locString = val.formatted_address; $.each(val.address_components, function(x, comp) { if($.inArray("postal_code", comp.types) &gt; -1) { console.log("___" + comp.types); zipmap[locString] = comp.short_name; } }); suggestions.push(val.formatted_address); }); add(suggestions); }); } </code></pre> <p>requrl is the URL which you are making a request to.</p> <p>Done!</p> <p>Credit to: <a href="http://graphicmaniacs.com/note/getting-a-cross-domain-json-with-jquery-in-internet-explorer-8-and-later/" rel="nofollow">http://graphicmaniacs.com/note/getting-a-cross-domain-json-with-jquery-in-internet-explorer-8-and-later/</a></p> <p>I just LOVE IE!</p>
 

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