im trying to make a GET command, to download an XML
code:
function loadXMLDoc(url){
Debug.Trace("loading XML");
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET",url,true);
xmlhttp.onreadystatechange = function(){
if( xmlhttp.readystate==4 ){
Debug.Trace(xmlhttp.responseText);
var response = xmlhttp.responseXML.documentElement;
var x = response.getElementsByTagName('currency');
for (i=0;i<x.length;i++){
arr[i+1] = new Array(
x[i].getAttribute('code'),
x[i].getAttribute('rate').replace(",","."),
x[i].getAttribute('desc') );
}
}//if
}//function
xmlhttp.send(null);
}
but, im getting an error at the xmlhttp.send(null) ... also tried send(' ')
this function loads an XML, then strip the content... but i get an error
also... were do i call this function to make it run a single time ??