0
У меня есть следующая функция JQuery, которая должна размещать memberID как переменную. И я хочу поймать ее в моем файле add_comment.php с $memberID = $_REQUEST['memberID']
, но он возвращает null.Проблема метода JQuery .post()
$('a.comment').die("click").live("click", function(e){
var getpID = $(this).parent().attr('id').replace('commentBox-','');
var comment_text = $("#commentMark-"+getpID).val();
if(comment_text != "Write a comment...")
{
$.post("lib/actions/add_comment.php?comment_text="
+comment_text+"&post_id="+getpID,{ memberID : 5
}, function(response){
$('#CommentPosted'+getpID).append($(response).fadeIn('slow'));
$("#commentMark-"+getpID).val("Write a comment...");
});
}
});
Можете ли вы попробовать, избегая «comment_text»? – peakit