title: Rails: Get remote page via ajax
body: <p>I use Rails3 and I try to get remote page via ajax. (https://play.google.com/store/apps/details?id=).</p>
  
  <pre><code>$.ajax({
        url: app_url,
        type: 'GET',
        data: "id=&lt;id&gt;",
        crossDomain : true,
        dataType: 'jsonp',
        success: function ( code ) {
          alert("Good.");
        }
      });
  </code></pre>
  
  <p>When I run the script, the I see: "Uncaught SyntaxError: Unexpected token &lt; " error message.</p>
  
  <p>By the way, I tried do it as: </p>
  
  <pre><code>$.ajax({
        url: app_url,
        type: 'GET',
        data: "id=&lt;id&gt;",
        crossDomain : true,
        dataType: 'jsonp',
        success: function ( code ) {
          alert("Good.");
        }
      });
  </code></pre>
  
  <p>But I see "Origin <a href="http://example.com:3000" rel="nofollow">http://example.com:3000</a> is not allowed by Access-Control-Allow-Origin." error message.</p>
  
  <p>How can I fix the error and get the page ?</p>
  
  <p>Thanks.</p>