View Single Post
Eski 15/09/2007, 23:11   #3 (permalink)
che
Üye
 
che Adlı Üyenin Profil Grafiği
 
Üyelik Tarihi: 01/2007
Mesaj: 345
Varsayılan

Örnek:

function iframe(dosya){
httpObj = createXMLHttpRequest(veriler);
if (httpObj){
httpObj.open("GET",dosya,true);
httpObj.send(null);
}
}
function veriler(){
if ((httpObj.readyState == 4) && (httpObj.status == 200)){
$("divid").innerHTML = httpObj.responseText;
}else{
$("divid").innerHTML = "<b>Yükleniyor...</b>";
}
}
function createXMLHttpRequest(cbFunc){
var XMLhttpObject = null;
try{
XMLhttpObject = new XMLHttpRequest();
}catch(e){
try{
XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
return null;
}
}
}
if (XMLhttpObject) XMLhttpObject.onreadystatechange = cbFunc;
return XMLhttpObject;
}

function $(tagId){
return document.getElementById(tagId);
}

//kullanımı
iframe("deneme.htm");
che hatta değil   Alıntı Yaparak Yanıtla