Hey guys I'm running a script that is just sitting on my desktop.
Code:
function getfile(filename)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",filename,false);
xmlhttp.send();
return xmlhttp.responseText;
}
this works in firefox but not chrome or IE
if I try and create a callback function ala
Code:
function getfile(filename)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
responsetext = xmlhttp.responseText;
}
}
xmlhttp.open("GET",filename,true);
xmlhttp.send();
return responsetext;
}
it doesn't work in any of them
thoughts?