JQuery Restful code to retrieve JSON

I am attempting to retrieve data from a RESTful url where the only thing that has to be passed to it is an id with a couple of letters and 3 numbers.  I should be able to retrieve the data in JSON format but I am not having any success.   Please help!
VBBRettAsked:
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.

skijCommented:
Here is an example of a jQuery code that retrieves data from Google using a a RESTful URL.  Data is retrieved as JSON wrapped in a callback, a method known as JSONP.
<!DOCTYPE html>
<head>
<title>Demo</title>
<link href="css/new_style.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function(){
 var q = 'Hippopotamus';
 results=5;
 if(location.search) q=unescape(location.search);
 $.getScript('https://ajax.googleapis.com/ajax/services/search/web?callback=processResults&rsz='+results+'&v=1.0&q='+escape(q));
});

function processResults(data){
 $.each(data.responseData.results, function (i, data) {
  $('#gResults').append('<a href="'+ data.url +'" target="_blank">'+ data.titleNoFormatting +'<a><br />' + data.content + '<hr />');
 });
}
</script>
</head>
<body>

<h1>Results</h1>

<div id="gResults"></div>

</body>
</html>

Open in new window

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
VBBRettAuthor Commented:
Awesome!
0
VBBRettAuthor Commented:
skij is a pro!
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
jQuery

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.