I build a code here.. that when he\she posts a comment the JavaScript will slide down a new comment block...
But i need to refresh after click the post button - then - there will be a new comment block under a post.
This is my code:
<script language="javascript" type="text/javascript">
//Sending the jquery comment
function SendComment(blab_id) {
var comment_txt = $("#Comment"+blab_id).val()
if(comment_txt == ""){
alert("Please Enter a Comment!");
}else{
$.post("scripts/send_comment.php", {Comment: comment_txt, bid: blab_id} ,function(data){
$("#new_comment"+blab_id).html(data);
$("#new_comment"+blab_id).slideDown(300);
$("#Comment"+blab_id).val("");
});
}
}
</script>
'.$comment_txt.'
·'.$whenComment.'·