Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    inserting text from other file

    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;
    }

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    *this message will self destruct in n-seconds*

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes it does. all i need right now is some 'flag' to tell me when data transaction is complete... any halp?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •