the code below is a jquery POST request javascript. i want to use the data I am posting in the callback function. if u take a look,
$('#fb_user_msg').innerHTML = data.comment;
the above line is trying to include the comment in the html (unsuccessfully). i am sure this is easy but I dont know why I am not getting it right.
$("#submit_js").click(function() {
$.post(
"user_submit.php",
{comment: $("#comment").val(), aid: imgnum},
function(data){
/*alert(data);*/
//$('#greetings').html('Your choice was submitted successfully. Thank You for voting.');
$('#confirm_msg').addClass("on");
$('#care_parent').addClass("off");
$('#fb_user_msg').innerHTML = data.comment;
}
);
});
please help??