Thread: MSXML Parser
View Single Post
  #1 (permalink)  
Old Nov 4th, 2005, 10:49
Aditi Guleria Aditi Guleria is offline
New Member
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question MSXML Parser

Hi All
I am facing a problem using the XMLHTTPRequest object in javascript. Iam using it to populate an array with fields from the database and then display them in a dropdwn list. I get a javascript error saying

Error:Unknown name
Code: 0

I have IE6 on my machine. And the javascipt code goes like this

//XMLHTTP
if(window.XMLHttpRequest){
try {
xmlhttp = new XMLHttpRequest();
} catch(e) {
xmlhttp = false;
} // branch for IE/Windows ActiveX version
}
else if(window.ActiveXObject) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xmlhttp = false;
}
}
}

var val = SelectFld.value;
var httpAddr = "http://aditi/centralspares/admin/getmodels.asp?manufid="+val ;
xmlhttp.open("GET", httpAddr, false);
xmlhttp.send("");
*********************************************
Reply With Quote