Code: Select all
function updatebox(){
//just for the fade effect
messageList.hide();
loading.fadeIn();
//send the post to box.php
var topic_id = inputid.attr("value");
$.ajax({
type: "POST", url: "shoutter/shoutbox.php", data: "action=update&id=" + id,
complete: function(data){
loading.fadeOut();
messageList.html(data.responseText);
messageList.fadeIn(2000);
}
});
}Code: Select all
setInterval(updatebox, 3000);