Guest User

Untitled

a guest
May 20th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. function getHTTPObject(){
  2. if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
  3. else if (window.XMLHttpRequest) return new XMLHttpRequest();
  4. else {
  5. alert("Your browser does not support AJAX.");
  6. return null;
  7. }
  8. }
  9.  
  10. // Change the value of the outputText field
  11. function setOutput(){
  12. if(httpObject.readyState == 4){
  13. document.getElementById('outputText').value = httpObject.responseText;
  14. }
  15.  
  16. }
  17.  
  18.  
  19. function checkException()
  20. {
  21.  
  22. httpObject = getHTTPObject();
  23. if (httpObject != null)
  24. {
  25. httpObject.open("GET", "reports.php?exceptions="
  26. +document.getElementById('exceptionsID').value+"&date1=" + document.getElementById('date1').value, true);
  27. httpObject.send(null);
  28. httpObject.onreadystatechange = setOutput;
  29. }
  30. }
  31.  
  32. var httpObject = null;
  33.  
  34. // Change the value of the outputText field
  35. function setOutput(){
  36. if(httpObject.readyState == 4){
  37. document.getElementById('outputText').innerHTML= httpObject.responseText;
  38. }
  39.  
  40. }
  41.  
  42. // Change the value of the outputText field
  43. function setOutput(){
  44. if(httpObject.readyState == 4){
  45. document.getElementById('outputText').innerHTML= httpObject.responseText;
  46. }
  47.  
  48. }
  49.  
  50. function setOutput() {
  51. if(httpObject.readyState == 4) {
  52. document.getElementById('outputText').innerText = httpObject.responseText;
  53. }
  54. }
  55.  
  56. <span id="outputText">Some default text here</span>
Add Comment
Please, Sign In to add comment