Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. <script type='text/javascript' src='http://p1.lt/jq.js'></script>
  6. <script type="text/javascript" src="http://p1.lt/js.js"></script>
  7.  
  8. <script>
  9.  
  10. function citata(user){
  11. document.getElementById("minichatzin").value += " "+user+": -> ";
  12. }
  13. function reloadPage()
  14. {
  15. location.reload()
  16. }
  17. function loadChat(username)
  18. {
  19. var xmlhttp;
  20. if (window.XMLHttpRequest)
  21. {
  22. xmlhttp = new XMLHttpRequest();
  23. }
  24. else
  25. {
  26. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  27. }
  28. xmlhttp.onreadystatechange = function()
  29. {
  30. if (xmlhttp.readyState === 4 && xmlhttp.status === 200)
  31. {
  32. document.getElementById("myDiv2").innerHTML = xmlhttp.responseText;
  33. }
  34. };
  35. xmlhttp.open("GET", "minichat2.php?id=&username=" + username, true);
  36. xmlhttp.send();
  37. }
  38. function minichatwrite()
  39. {
  40.  
  41.  
  42. zin = document.getElementById("minichatzin").value;
  43. var xmlhttp;
  44. if (window.XMLHttpRequest)
  45. {
  46. xmlhttp = new XMLHttpRequest();
  47. }
  48. else
  49. {
  50. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  51. }
  52. xmlhttp.onreadystatechange = function()
  53. {
  54. var node = document.getElementById('error'),
  55. textContent = node.textContent;
  56. if (xmlhttp.readyState === 4 && xmlhttp.status === 200)
  57. {
  58. document.getElementById("error").innerHTML = xmlhttp.responseText;
  59. setTimeout(function(){document.getElementById("error").innerHTML = textContent;},3000);
  60. document.getElementById("minichatzin").value = "";
  61. }
  62. };
  63. xmlhttp.open("GET", "minichat.php?zinute=" + zin, true);
  64. xmlhttp.send();
  65. }
  66. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement