title: Cross domain Ajax request from within js file
body: <p>Here's the problem:</p>
  
  <p>1.) We have page here... www.blah.com/mypage.html</p>
  
  <p>2.) That page requests a js file www.foo.com like this...</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://www.foo.com/jsfile.js" /&gt;
  </code></pre>
  
  <p>3.) "jsfile.js" uses Prototype to make an Ajax request back to www.foo.com.</p>
  
  <p>4.) The ajax request calls www.foo.com/blah.html. The callback function gets the html response and throws it into a div.</p>
  
  <p>This doesn't seem to work though, I guess it is XSS. Is that correct?</p>
  
  <p>If so, how can I solve this problem? Is there any other way to get my html from www.foo.com to www.blah.com on the client without using an iframe?</p>