...

View Full Version : inserting text from other file



looka
08-30-2004, 12:38 PM
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;
}

codegoboom
08-30-2004, 01:12 PM
It may have something to do with async: oxmlhttp.open("GET",filename,false);... but I've never used it, so...


varAsync [optional]
A Boolean indicator of whether the call is asynchronous. The default is True (the call returns immediately). If set to True, attach an onreadystatechange property callback so that you can tell when the send call has completed.

looka
09-05-2004, 09:30 PM
yes it does. all i need right now is some 'flag' to tell me when data transaction is complete... any halp?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum