Archive for Ajax

unknown runtime error (Bilinmeyen çalışma hatası)

İnternet explorer bu ilginç hatayı veriyor. Biraz araştırdım ve şu sonuca ulaştım.

<span>.innerHTML="<b>asdfasdfasdfasdf</b>";

bu bazen hataya sebep oluyor. Bu yüzden SPAN yerine DIV tagı kullanmanız tavsiye ediliyor. Bence firefox kullanın onda herhangi bir sorun yok :)



Not: Adamakıllı hata mesajı yazamıyor galiba şu microsoft programcıları..


Technorati :

Leave a comment »

AJAX.js

1  function ajaxPost(adres, parameters) {2    var xmlHttp;3    try{4      // Firefox, Opera 8.0+, Safari5      xmlHttp=new XMLHttpRequest();6    }catch (e){7      // Internet Explorer8      try{9        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");10       }catch (e){11         try{12             xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");13         }catch (e){14             alert("AJAX desteğiniz yok üzgünüz!");15             return false;16         }17     }18   }19   xmlHttp.onreadystatechange=function(){20       if(xmlHttp.readyState==4){21           //alert(xmlHttp.responseText);22       }else{23           alert('Sisteme işlemede hata');24       }25   }26   xmlHttp.open('POST', url, true);27   xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");28   xmlHttp.setRequestHeader("Content-length", parameters.length);29   xmlHttp.setRequestHeader("Connection", "close");30   xmlHttp.send(parameters);31 }32 


Technorati :
Del.icio.us :

Leave a comment »

Switch to our mobile site