--
You received this message because you are subscribed to the Google Groups "JavaScript InfoVis Toolkit" group.
To post to this group, send email to javascript-information...@googlegroups.com.
To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.
Sent from my iPhone
> For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.
>
hi all,
i been tryin to call json from a servlet into javascript using jquery
and here is my snippet
jQuery(document).ready(function() {
alert("inside ready method");
jQuery.ajax({
url : "http://localhost:_________",
type : "POST",dataType : 'json',
async : false,
success : function(data) {
alert('Success!');
var obj = jQuery.parseJSON(json);
},
});
});
i get a success alert and my servlet is been call'd from the above
jquery but json object is not transferred from servlet to javascript
can anyone pls explain where im doing it wrong...
thanks in advance
--
You received this message because you are subscribed to the Google Groups "JavaScript InfoVis Toolkit" group.
To post to this group, send email to javascript-information...@googlegroups.com.
To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.
If not that, can you use curl to call your servlet and paste the output into jsonlint.com and it validate?
Personally, I've had a lot of issues with $.getJSON() as my experience has seen issues with IE in the past. Instead try $.ajax().
Technically the mime-type should be application/json but I don't think all browsers like that and don't think jQuery cares AFAIK.
- Jim
> For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.
>