Guest User

Untitled

a guest
Dec 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <script type="text/javascript">
  2.  
  3.  
  4. var inter =setInterval(function()
  5. {
  6. var xmlhttp= new XMLHttpRequest();
  7. xmlhttp.open("GET","timeout.php",false);
  8. xmlhttp.send(null);
  9. var tout= xmlhttp.responseText;
  10. document.getElementById("response").innerHTML = tout;
  11. },1000);
  12.  
  13. if(tout=0)
  14. {
  15. clearInterval(inter);
  16. }
  17.  
  18. </script
  19.  
  20. <script type="text/javascript">
  21.  
  22.  
  23. var inter =setInterval(function()
  24. {
  25. var xmlhttp= new XMLHttpRequest();
  26. xmlhttp.open("GET","timeout.php",false);
  27. xmlhttp.send(null);
  28. var tout= xmlhttp.responseText;
  29. //changes over here
  30. if(tout=0)
  31. {
  32. clearInterval(inter);
  33. }
  34. document.getElementById("response").innerHTML = tout;
  35. },1000);
  36.  
  37.  
  38.  
  39. </script>
Add Comment
Please, Sign In to add comment