Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>[UPDATE] Derp. I think I pointed out several outstanding issues here, but must admit I still wasn't quite catching onto the problem of cross site.</p> <p>The final piece of the puzzle is using a proxy so PHP can get the xml. So this isn't a javascript only solution, but mostly it is: <a href="http://benalman.com/projects/php-simple-proxy/" rel="nofollow">http://benalman.com/projects/php-simple-proxy/</a> [/UPDATE]</p> <p>I'd prefer you don't give up on this for the wrong reason. You'll remember that the X in AJAX stands for XML :)</p> <p>So two ideas based on duskwuff's commments. </p> <ul> <li>You surely can parse XML with javascript. The function you are using already supports 'xml' as a datatype. </li> <li>It seems like you are going wrong with the callback part. You can pass a callback function to either complete, success, and/or error.</li> </ul> <p>Here's the code:</p> <pre><code>$.ajax({ type: 'GET', url: requestURL, dataType: 'xml', error: function(jqXHR, textStatus, errorThrown){ console.log(textStatus); }, success: function(data, textStatus, jqXHR){ console.log(data); } }); </code></pre> <p>Your more pressing problem is in the authentication, but perhaps you will be able to get more details now using the error function and it's errorThrown argument.</p> <p>My recommendation is to see if you can get the URL generated in another context and compare that to what you have to see if you're doing it right (it's been a few months, but I thought I remember there being an amazon tool that generated the request URL for you).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload