title: How to get contents of URL into a string variable using JavaScript
body: <p>I'm trying to get the JSON from this URL into variable</p>
  
  <p>This bit of code successfully puts it in a div element</p>
  
  <pre><code>$("#siteloader").html('&lt;object data="MYURL"&gt;');
  </code></pre>
  
  <p>But I want the contents of that div inside a string variable rather than in the div.</p>
  
  <p>I've also tried the following:</p>
  
  <pre><code>$.ajax({
      type : "GET",
      dataType : "jsonp",
      url : "MYURL", // ?callback=?
      success: function(data){
          // do stuff with data
      }
  });
  </code></pre>
  
  <p>But this shows a syntax error "Uncaught SyntaxError: Unexpected token : " "getfixes:1" in the javascript console when I try it in chrome.</p>
  
  <p>Is it possible for me to just get the contents of a URL as a string in the data variable?</p>