I'm trying to retrieve data from the itis.gov web service and display on an html page.
The site has JSON and JSONP web services. I cannot figure out why my code below is not working, I've got the code to work with other JSON web service APIs such as the facebook API.
Here is an example JSON API call using the webservice method "getScientificNameFromTSN"
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<body>
<script>
$(document).ready(function() {
var url="http://www.itis.gov/ITISWebService/jsonservice/getScientificNameFromTSN?";
$.getJSON(url, { "tsn" : "202384" }, function(data) {
document.write(data.author);
});
});
</script>
</head>
<body>
</body>
</html>
console.log(data)see in browser's console panel what u are getting in response