...

View Full Version : ActiveXObject



_carsten
10-18-2008, 04:52 PM
Hi

I'm trying to read data from 2 url's but the only one showing is the one containing
data from codingforum, can someone help me out here ??

Regards
Carsten



function readURL(){
objXml = new ActiveXObject("Microsoft.XMLHTTP");

objXml.open("GET", "http://www.yahoo.com", true);
objXml.onreadystatechange=function() {
if (objXml.readyState==4) {
alert(objXml.responseText);
}
}

objXml.send(null);
// alert("Now it's working !"); // IF I UNCOMMENT THIS LINE, EVERYTHING WORKS - WHY ??

objXml.open("GET", "http://www.codingforums.com", true);
objXml.onreadystatechange=function() {
if (objXml.readyState==4) {
alert(objXml.responseText);
}
}

objXml.send(null);
}

shyam
10-18-2008, 05:48 PM
because ur reusing the old object to make another request...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum