Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. function loadCourses(){
  2.  
  3. var xhttp = new XMLHttpRequest();
  4. var xhttp2 = new XMLHttpRequest();
  5. xhttp.onreadystatechange = function(){
  6.  
  7. if(this.readyState == 4 && this.status == 200){
  8.  
  9. document.getElementById("courses").innerHTML += this.responseText;
  10.  
  11. }
  12. }
  13.  
  14. xhttp2.onreadystatechange = function(){
  15.  
  16. if(this.readyState == 4 && this.status == 200){
  17.  
  18. document.getElementById("studentsTable").innerHTML += this.responseText;
  19.  
  20. }
  21. }
  22.  
  23. xhttp.open("GET","http://localhost/Ateneo/getCourses.php",true);
  24. xhttp2.open("GET","http://localhost/Ateneo/getStudents.php",true);
  25. xhttp.send();
  26. xhttp2.send();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement