Jquery Ajax call problemn with Data Type

sammyugq18

New Member
I'm using Jquery to try to grab some data from the Open Calais api, but if I cannot get a valid response. If I use data type "script" I get an error of "missing ; before statement. If I use data type "xml" or anything else I get a 403 error from the Open Calais server.I decided to try the "script" data type based on the last entry on this Calais forum postPlease don't hold back on the critiques and comments regarding my code. I'm leaning as I go.My code:\[code\]var baseUrl="http://api.opencalais.com/enlighten/calais.asmx/Enlighten";var licenseID="wt8h3w3pt333eewdwsyuhut6";var content="In response to a legislative provision in a bill reauthorizing the FAA, the agency has launched a comment period as it selects six test sites to evaluate unmanned aircraft systems. The focus of the proceeding will be determining the location of the test sites along with establishing...";var PARMS="&contentType=text/xml&outputFormat=xml/rdf"var PostDatavar = "?licenseID="+licenseID+"&content="+encodeURIComponent(content)+PARMS;var componentURL=baseUrl+PostDatavar;function sendIt(sendData){$.ajax({ url:componentURL, type: "POST", dataType:"script", success:function(data){ alert(data)); console.log(data); }, error:function(){ alert("it's broken"); }});\[/code\]}
 
Top