Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function update(){
- $.post("chathandler.php", {}, function(data){
- $("#chatfield").val(data);
- setTimeout('update()', 1000);
- });
- }
- $(document).ready(function(){
- update();
- $("#button").click(function(){
- $.post("chathandler.php"), {message: $("#message").val()},function(data){
- $("#chatfield").val(data);
- $("#message").val("");
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement