looka
08-30-2004, 11:38 AM
i use a script written by vladi to import some data in document, but when the script runs, it freezes entire page until import is complete.
i use function:
function getFile (filename){
oxmlhttp = null;
try
{ oxmlhttp = new XMLHttpRequest();
oxmlhttp.overrideMimeType("text/xml");
}
catch(e)
{ try
{ oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{ return null;
}
}
if(!oxmlhttp) return null;
try
{ oxmlhttp.open("GET",filename,false);
oxmlhttp.send(null);
}
catch(e)
{ return 'ni fajla';
}
//show(oxmlhttp.responseText, '', objName);
return oxmlhttp.responseText;
//oxmlhttp.responseText = null;
}
i use function:
function getFile (filename){
oxmlhttp = null;
try
{ oxmlhttp = new XMLHttpRequest();
oxmlhttp.overrideMimeType("text/xml");
}
catch(e)
{ try
{ oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{ return null;
}
}
if(!oxmlhttp) return null;
try
{ oxmlhttp.open("GET",filename,false);
oxmlhttp.send(null);
}
catch(e)
{ return 'ni fajla';
}
//show(oxmlhttp.responseText, '', objName);
return oxmlhttp.responseText;
//oxmlhttp.responseText = null;
}