Query Amazon with javascript

ok so I have been banging my head over this for sometime now and I think it is time to get you "Experts" involved.
I am trying to query amazon using JavaScript with the following code.  initially I am only trying to retrieve one record using its ASIN, but would like to have it search more than one  in the future.
The issue I am encountering is that although the initial call was successful upon running again the page renders and it is blank.  I am assuming that it is due to the signature but cannot figure out how to overcome.

Any help would be great.

<script src="jquery.js"></script>
<script src="jquery.xdomainajax.js"></script>

<script>

$(document).ready(function(){

  
$.ajax({
    url: 'http://ecs.amazonaws.com/onca/xml?'+
	'AWSAccessKeyId=AKIAIRINHF6V5xxxxxxxx'+
	'&AssociateTag=xxxxxxxxxx+
	'&Keywords=B004C5P522'+
	'&Operation=ItemSearch'+
	'&SearchIndex=All'+
	'&Service=AWSECommerceService'+
	'&Timestamp=2014-07-14T17%3A47%3A17.000Z'+
	'&Signature=eiVgRbMPlZwMau%XXXXXXXXXXXXXXX3D',
    type: 'GET',
    dataType: "xml",
    success: function(res) {
        console.log(res.responseText);

        var xml = $.parseXML(res.responseText);
        var $tmp = $( xml );
        var tmp2 = $tmp.find( "head" );
        $('.container').append(tmp2.text()+'<br>');


    },
	error: function(){
		alert('failed')
	}
});


});
</script>

</body>
</html>

Open in new window

jriver12Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leakim971PluritechnicianCommented:
could you paste what you get with line 22?
0
jriver12Author Commented:
I don't get anything. Just blank screen.
0
leakim971PluritechnicianCommented:
unless some condition Ajax call are not allowed cross domain/protocol
that mean than your page residing on www.yourdomain.com CAN'T get data from ecs.amazonaws.com

you need to use a server side language to get the content and send it back to your page
1 - so your page call your server side function and ask him to dowload the right content
2 - your server get the content from amazon : ecs.amazonaws.com/onca/
3 - your server send the content requested to/by your page
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

jriver12Author Commented:
I will check in am and update on condition.

thanks.
0
jriver12Author Commented:
Well have had no luck. I have been trying to do it with coldfusion.
0
leakim971PluritechnicianCommented:
so ? you did not find any coldfusion proxy code? I posted one some months ago for a similar question
0
jriver12Author Commented:
no I have not, at least any that work.  Do you still have that code you posted?  If possible can I take a look?
0
GaryCommented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0
jriver12Author Commented:
Thanks for the push in the right direction. unfortunately the new API would not render the information we needed.  

thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Services

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.