#1
  1. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    from reading some previous posts, i noticed that javascript does not have any real file output. however i have heard that there is a way to make an applet do the file stream work. if anyone knows how to do this, could you let me know.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    n ireland
    Posts
    15
    Rep Power
    0

    erm this might be wrong


    as far as i know if you are using javascript client side (or an applet in your browser) you cannot use direct file i/o on any of the users files as this would SERIOUSLY compromise security.

    you need to get the user to run an exe of some form to do file i/o.

    if you are running it server side then file i/o is not a problem as the scripting engine will take care of it. look at http://msdn.microsoft.com/scripting/ for the jscript reference.

    bye dude
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    19
    Rep Power
    0
    There is, however some file i/o capbilities with client side VBscript. As far as Javascript, you can read .txt, .html, .js and a few other file types in IE4+ using this method:

    1) Create a frame. Pretend its called "textFrame". The source should be the file you wish to read. NOTE: It CANNOT be an <iframe>.

    2) You can read the contents of the page from a different frame like so:

    var string = parent.textFrame.document.body.innerHTML;

    alert(string);

    *As far as I know, that is the extent of any kind of file handling with JavaScript.

IMN logo majestic logo threadwatch logo seochat tools logo