Results 1 to 2 of 2

Thread: textfile

  1. #1
    Join Date
    Dec 1969

    Default textfile

    I am looking for a tutorial on reading and displaying data on a web page from a textfile, using JavaScript. Can anyone direct me to that or is that not possible with JavaScript?

  2. #2
    Join Date
    Dec 1969

    Default RE: textfile

    &nbsp;<BR>You&#039;ll need to use the Scripting.FileSystemObject.<BR><BR>Try this:<BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/sgworkingwithfiles.asp<BR><BR>You can open and read a file using the OpenTextFile method.<BR><BR>If you want a web page to be rendered as plain text rather than HTML then change the MIME type to "text/plain" before writing any content:<BR><BR>Response.ContentType = &#039;text/plain&#039;;<BR><BR>If you meant that you wanted to do this using client-side JavaScript then sorry, you can&#039;t. JavaScript won&#039;t allow you to read local files because it&#039;s a security risk.<BR><BR>Good luck,<BR><BR>Chris<BR>

Posting Permissions

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