Home  • University • Campus
memorize this code....Ajax Lib.....

function ajaxGET(div,url){
	var
xmlhttp; if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest();//
code for IE7+, Firefox, Chrome, Opera, Safari }else{ xmlhttp=new
ActiveXObject("Microsoft.XMLHTTP");// code for IE6,
IE5 } xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4
&&
xmlhttp.status==200){ document.getElementById(div).innerHTML=xmlhttp.responseText;
}else{
document.getElementById(div).innerHTML="Loading...";
} } xmlhttp.open("GET",url,true); xmlhttp.send(); }

Comments 0


Copyright © 2025. Powered by Intellect Software Ltd