Written in response to jQuery.ajax() never fires, no matter what I do:
This is working for me in FF and Chrome. I have found that not specifying the dataType can cause issues in parsing the response sometimes. Also, if you are using firebug or chrome console.log is much more helpful for debugging, just be careful and don't leave it in your code, because it isn't supported in IE. There are shims out there to create support though...
function rateThisAdWithStars(howManyStars, userId, adId) {
$.ajax({
url: "/echo/json/",
dataType: 'json',
data: { user_id: userId,ad_id: adId,rating: howManyStars},
success: function(data) {
console.log(data);
},
error: function(xqr, code, text){
alert(['fail ',code,': ',text].join(''));
}
});
}

