Guest User

Untitled

a guest
Jul 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. function list1(ob){
  2.  
  3.  
  4. var id= ob;
  5. var xmlhttp1;
  6. if (window.XMLHttpRequest)
  7. {// code for IE7+, Firefox, Chrome, Opera, Safari
  8. xmlhttp1=new XMLHttpRequest();
  9. }
  10. else
  11. {// code for IE6, IE5
  12. xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
  13. }
  14. xmlhttp1.onreadystatechange=function()
  15. {
  16. if (xmlhttp1.readyState==4 && xmlhttp1.status==200)
  17. { alert("ajax1");
  18. list2(id);
  19. }
  20. }
  21. xmlhttp1.open("POST","/ajax/listSites.php",true);
  22. xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  23. xmlhttp1.send("id="+id);
  24. }
  25.  
  26.  
  27. function list2(obb){
  28. var idd=obb;
  29. var xmlhttp;
  30. if (window.XMLHttpRequest)
  31. {// code for IE7+, Firefox, Chrome, Opera, Safari
  32. xmlhttp=new XMLHttpRequest();
  33. }
  34. else
  35. {// code for IE6, IE5
  36. xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  37. }
  38. xmlhttp.onreadystatechange=function()
  39. {
  40. if (xmlhttp.readyState==4 && xmlhttp.status==200)
  41. { alert("ajax2");
  42. list3(idd);
  43. }
  44. }
  45. xmlhttp.open("POST","/ajax/access_points_do_actions.php",true);
  46. xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  47. xmlhttp.send("sel_system_id="+idd+"&action="+'LIST_SLAVE_FOR_ACCESS_POINT');
  48.  
  49. }
  50.  
  51. onchange="Function1(); Function2();"
  52.  
  53. <select id="se" onchange="javascript:list1(this.value); //this is current code
  54.  
  55. <select id="se" onchange="Javascript: list1(this); list1(this);">
Add Comment
Please, Sign In to add comment