title: google spreadsheets - ajax call (get and post)
body: <p>what I need to do is read the content of a "public" google spreadsheet (by public I mean that I saved the sheet clicking on "File > Publish to the web", so it's accessible without the need to be logged in into a google account), and, why not, write something into it too.</p>
  
  <p>googlin' around, I found that I can access the sheet and get the xml equivalent of the sheet content with something like</p>
  
  <pre><code>https://spreadsheets.google.com/feeds/list/&lt;sheetCode&gt;/od6/public/values
  </code></pre>
  
  <p>It works great if I load that url into a browser. But I need to find a "javascript-way" to get and handle the returned value, ie the xml (or json, but xml would be preferable).</p>
  
  <p>I tried to use an ajax call, but I think there's something messy with the protocol.. I can't get the server response correctly.</p>
  
  <pre><code>$.ajax({
      type: "GET",
      url: "https://spreadsheets.google.com/feeds/list/&lt;sheetCode&gt;/od6/public/values",
      success: function(data){alert("yeah");},
      error: function(){alert("fail..");},
      dataType:"xml",
  });
  </code></pre>
  
  <p>I also tried to get the json instead of xml, adding "?alt=json" to the url and changing the datatype, but I still have the problem..</p>
  
  <p>Any idea / suggestion?</p>
  
  <p>Thanks in advance, best regards</p>