CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: file open

  1. #1
    Join Date
    Jul 2002
    Posts
    2

    file open

    Hello all
    im very new to javascript and id appreciate a little help out of a hole ive dug myself into

    basically can java script open a .txt file and read out the contents ? if so could you show me how ?

    thanks a million
    Al

  2. #2
    Join Date
    Aug 2002
    Location
    Reykjavik, Iceland
    Posts
    201
    JavaScript can read the contents of files of type "text/html" (to a point) but not files of type "text/plain".

    You can use perl for this.

  3. #3
    Join Date
    May 2002
    Posts
    171
    can you show the code the read a file within javascript?

  4. #4
    Join Date
    Jul 2002
    Location
    India
    Posts
    505
    Are you trying to read a text file on the client machine using javascipt from within the browser? If so, this is not possible due to the browsers security.

    If you are using WSH (windows script host) check this out

    http://www.winscripter.com/wsh/fileio/ht_readfile.asp

    Satish

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured