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; } } } function ajaxpage(url, containerid){ kur(); // istegimizi olusturuyoruz xmlhttp.open('GET', url, true) document.getElementById(containerid).innerHTML='

'; if (xmlhttp.readyState == 4 && (xmlhttp.status==200 || window.location.href.indexOf("http")==-1)) document.getElementById(containerid).innerHTML=xmlhttp.responseText // durumu yukleyiciyi belirliyoruz xmlhttp.onreadystatechange = function (){ if( xmlhttp.readyState == 4 ){ document.getElementById(containerid).innerHTML = xmlhttp.responseText; } } // istegi gonderiyoruz xmlhttp.send(null); }