in my projecet i am getting ** Illegal invocation** error from Jquery ajax.
when i click the button and dubbing on that time data is not posted from browser to server it showing
i cant understand how fix it my jquery ajax code is.`
$("#review-save").click(function () {
debugger;
var productid = $("#productid").text();
var review_heading = $("#txtreview-heading").val();
var review_rate = $("#rate-span").text();
var review_Comment = $("#txtreviewcomment").val();
var reviewer_name = $("#txtreviewername")
if (review_heading != "" && review_rate != "" && review_Comment != "" && reviewer_name != "") {
$.ajax({
url: '/Product/AddReview',
method: 'GET',
dataType:'json',
data: { productid: productid, 'reviewerId': reviewer_name, reviewPoint: review_rate, },
contentType: 'application/json; charset=utf-8',
success: function (data) {
alert(data.Status);
}
},
error: function (err) {
alert(err);
}
})
}
else {
alert("please fill Every Field");
}
})
please give i solution ,how fixed it..
Aucun commentaire:
Enregistrer un commentaire