Advertisement
GWibisono

ajax jadul

May 11th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  function createRequestObject()
  2.  {
  3.         var ie=document.all;
  4.         if(ie){
  5.             return new ActiveXObject("Microsoft.XMLHTTP");
  6.         } else {
  7.             return new XMLHttpRequest();
  8.         }
  9.  }
  10.     var http = createRequestObject();
  11.      
  12.     function detail(id )
  13.     {            
  14.          
  15.             http.open('get', 'index2.php?option=com_klinik&act=detailRegisPay&i='+id  );    
  16.             http.onreadystatechange = handleResponse;
  17.             http.send(null);
  18.         //alert('myTarget='+id+' '+handleResponse);
  19.     }
  20.  
  21. function handleResponse(){   
  22.         if(http.readyState == 4)
  23.         {
  24.             var response = http.responseText ;               
  25.             document.getElementById('otherPay').innerHTML =response;        
  26.              
  27.         }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement