Can someone help me with my code below.. In Firefox developer tool I am getting error message: :TypeError: $.post(...).success is not a function
All variables are submitted from form page..
Any advice and suggestions will be appreciated ...
Thank you
$(document).ready(function(){
$('#post-comment-btn').click(function(){
var _comment = $('#comment-post-text').val();
var _userId = $('#userId').val();
var _userName = $('#userName').val();
if(_comment.length > 0 && _userId != null) {
$.post("ajax/comment_insert.php",
{
task : "comment_insert",
userId : _userId,
comment: _comment,
}
).success(
function(data)
{
console.log("ResponseText:" + data);
}
);
console.log(_comment + " Username: " + _userName + " User Id: " + _userId);
} else {
console.log("The text area is empty..");
}
$('#comment-post-text').val("");
});
});