function Ajax(){
var xmlHttp;
try{
xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
}
catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
}
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
alert("No AJAX!?");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.getElementById('innerscroll3').innerHTML=xmlHttp.responseText;
}
}
xmlHttp.open("GET","http://www.domain.or...hat3.php", true);
xmlHttp.send(null);
}
</script>
<br>
<div id="innerscroll3"></div>
function Ajaxa(){
var xmlHttp;
try{
xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
}
catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
}
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
alert("No AJAX!?");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
document.getElementById('innerfetch').innerHTML=xmlHttp.responseText;
}
}
xmlHttp.open("GET","http://www.domain.or...chat4.php",true);
xmlHttp.send(null);
}
</script>
<div id="innerfetch"></div>
I have two ajax scripts on the same page. I got a result that only one is loaded and the other is not. How do i get two ajax to load on the same page ?
Edited by sungpeng, 04 December 2012 - 07:00 AM.












