title: How do jQuery do its cross-domain ajax calls and how can I replicate em with mootools
body: <p>in my eternal internal fight on whether to stay with mootools or jump to jQuery I've found on the jQuery documentation something that got my attention and this is that jQuery can ask for a JSON to a different domain, which is usually forbidden by the browser.</p>
  
  <p>I've seen some workarounds for cross-subdomain, but never cross-domain, and I'm really thrilled, first I thought I was server related but experimenting a little bit more I've seend that doing the very same JSON request from jQuery docs on Mootools doesn't work!</p>
  
  <p>This works
  jQuery:</p>
  
  <pre><code>$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;format=json&amp;jsoncallback=?",
          function(data){
            $.each(data.items, function(i,item){
              $("&lt;img/&gt;").attr("src", item.media.m).appendTo("#images");
              if ( i == 3 ) return false;
            });
          });
  </code></pre>
  
  <p>This doesn't
  Mootools:</p>
  
  <pre><code>var jsonRequest = new Request.JSON({url: "http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;format=json&amp;jsoncallback=?", onComplete: function(person, responseText){
      alert(responseText);
  }}).get({});
  </code></pre>
  
  <p>How can I replicate this behavior ? what causes it ? </p>
  
  <p>jQuery Doc: <a href="http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback" rel="nofollow noreferrer">http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback</a>
  Mootols Doc: <a href="http://mootools.net/docs/Request/Request.JSON" rel="nofollow noreferrer">http://mootools.net/docs/Request/Request.JSON</a></p>