Вообще-то чего то ты перемудрил, вот тебе минимум:
<style>
#processComment {
display: none;
position: fixed;
padding: 10px;
background: #ccc;
text-align: center;
}
</style>
<div id="processComment"></div>
<textarea id="textComment" name="textComment"></textarea>
<button id="addComment">Добавить</button>
<div id="allComments"></div>
<script>
$('#addComment').click(function() {
var process = $('#processComment');
$.ajax({
type: 'post',
url: 'comment.php',
data: $('#textComment').serialize(),
dataType: 'html',
beforeSend: function() {
process.text('Добавляется...').fadeIn();
},
error: function() {
process.text('Ошибка! Не добавлен').delay(5000).fadeOut();
},
success: function(data) {
$('#allComments').prepend(data);
process.text('Спасибо! Добавлен').delay(5000).fadeOut();
}
});
});
</script>
$_POST['textComment']