I am working on a small jQuery script which pulls json from a site on my domain. Have been working on it forever, and cant seem to get it. When I run the code with json as the "dataType" I get a status error of 0. However, when I put in jsonp, I get a status of 200 (OK), and a parsererror. The thing is, when I copy the contents of the json to a text file, I can grab it and parse it perfectly with "json" as the datatype. So, not sure where to go from here. Any help would be appreciated.
<HTML>
<BODY>
<script type ="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script><script type="text/javascript">
$(document).ready(function() {
$.ajax({
type: "GET",
contentType: "application/json",
dataType: "json",
url:"*blocked for security purposes*",
success: function(data){
alert("Successful");
console.log(data)
},
error: function(xhr, thrownError){
console.log('ERROR: ' + thrownError);
alert("status:" + xhr.status);
alert("threw:" + thrownError); }
}); });
</script>
</BODY>
</HTML>