$(document).ready(function() {
$('#button').click(function() {
try {
var json = $.ajax({url : 'http://www.example.com/experimental/service.php', type : 'jsonp', success : function() {alert('success')}});
alert(json);
} catch(err) {
alert(err.description)
}
var sjson = JSON.stringify(json);
$('#display').html(sjson);
})
})
After a button is pressed I get an alert message that says "success" and also one that says undefined, referring to the fact that nothing was returned from the ajax call. I checked the firebug 'net' tab and indeed i get a succesful response from the server of "jsonp1272724228884( {} );" Any ideas?