two options
you can change it to setInterval('updateShoutbox()', 4000) and it will run ever 4 seconds
or
you can just include another setTimeout('updateShoutbox()', 4000) in the updateShoutbox() function itself-- Just before the closing bracket-- so it will call itself every 4 seconds
function updateShoutbox(){
//send the post to shoutbox.php
$.ajax({
type: "POST", url: "shoutbox.php", data: "action=update",
complete: function(data){
loading.remove();
messageList.html(data.responseText);
}
});
setTimeout('updateShoutbox()', 4000);
}
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
How Can I Make An Auto-updating Shoutbox Type Script?
Started by shadowx, Aug 23 2007 02:24 PM
11 replies to this topic
#12
Posted 09 April 2010 - 03:13 AM
Not sure if anyone is still interested, but I've posted a shoutbox tutorial here:
http://www.knowledgesutra.com/forums/Put-A...sql-t71577.html
http://www.knowledgesutra.com/forums/Put-A...sql-t71577.html
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














