Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <b>
  2. <div id = "showMessages">
  3. <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
  4. function autoRefresh_div() {
  5. $("#showMessages").load("showMessages.php"); // a function which will load data from other file after x seconds
  6. alert("Auto-Refresh works fine");
  7. }
  8.  
  9. setInterval('autoRefresh_div()', 5000); // refresh div after 5 secs
  10. </script>
  11. <?php include("showMessages.php"); ?>
  12. </div>
  13. </b><br>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement