I am pulling in multiple xml files that are stored in the var names from a loop, but I want to use the xmlhttp request with the variable names, since it changes each iteration rather than reassigning the path every time i.e. folder/file.xml. So Basically I need help using the xmlhttp request to pull in xml details with a variable rather than a direct link i.e.:
I have:
xmlhttp.open("GET","FileNames.xml",false);
But I need:
var names = "xmlf/file.xml";
xmlhttp.open("GET",names,false);
EDIT:
xmlhttp.open("GET","FileNames.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
document.write("<table border='1'>");
var x=xmlDoc.getElementsByTagName("FileNames");
document.write("<tr>");
for (i=0;i<x.length;i++)
{
document.write("<td>");
var names = (x[i].getElementsByTagName("File")[0].childNodes[0].nodeValue);
// document.write(names);
my var names changes with each loop iteration, how can I store it like var names = [names[i],names[i], to x.length]