All pastes #568655 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-15 17:10 UTC
rendered paste body
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<script type="text/javascript" src="js/ajax.js"></script>
</head>
<body>

<script type="text/javascript">
 // Internet Explorer ise (5.0+)
   function kur() {
   try {
 
     xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");  // yeni versiyon xmlhttp
 
   } catch (e) {
 
      try {
 
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");  // eski versiyon xmlhttp
 
      } catch (e) {
 
        xmlhttp = false;
 
      }
 
   }
 
   // Mozilla veya Safari ise
   if ( !xmlhttp && typeof XMLHttpRequest != 'undefined' ) {
 
     try{
 
        xmlhttp = new XMLHttpRequest();
     
     }catch(e) {
     
        xmlhttp = false;
 
     }
 
   }
 
   // Diger
 
   if ( !xmlhttp && window.createRequest ) {
 
     try{
 
        xmlhttp = window.createRequest();
     
     }catch(e) {
     
        xmlhttp = false;
 
     }
 
   }
                return xmlhttp;
} 


kur();
function ajax(deger,div) 
{

   xmlhttp.open('get', 'rss.php?id=' + deger);
   xmlhttp.onreadystatechange = function (){
   if( xmlhttp.readyState == 4 ) {
      document.getElementById(div).innerHTML = xmlhttp.responseText;
   }
}
}
 
ajax('1','div1');
ajax('2','div2');

xmlhttp.send(null);



 

 
</script>
 
<div id="div1"></div><br /><br />
<div id="div2"></div><br /><br />


</body>
</html>