Tema: ajax ir IE8
Autorius: lens
Data: 2011-08-17 20:07:47
Kodel sitas kodas neveikia su IE8,7? su kitom narsyklem viskas gerai.
Daromi trys select box'ai. Uzkrovus puslapi pirma buna jau sukrautas is db, 
pagal pirma isrenka antra ir t.t.



<script language=Javascript>
function Inint_AJAX() {
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} //IE
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
try { return new XMLHttpRequest(); } catch(e) {} //Native Javascript
alert("XMLHttpRequest not supported");
return null;
};

function dochange(src, val) {
var req = Inint_AJAX();
req.onreadystatechange = function () {
if (req.readyState==4) {
if (req.status==200) {
document.getElementById(src).innerHTML=req.responseText;
}
}
};
req.open("GET", "technique.php?data="+src+"&val="+val);
req.setRequestHeader("Content-Type", 
"application/x-www-form-urlencoded;charset=utf-8"); // set Header
req.send(null);
}