Open file .txt

hello all
i want use code javascript
it can open 1 file .txt

You almost certainly can’t do that with JavaScript.

What are you wanting to do with that txt file?

i want open file .txt
i want read 1 message in file .txt
because i know file .js can run by file wscript.exe of Windowxp

Like Paul said with JavaScript alone its 100% not possible, the only way you can achieve this is by using a back end server side script that opens the file and returns it to your JavaScript code.

you can’t use javascript :smiley:

How about this code example, where the contents of a text file is read?
http://bulletproofajax.com/code/chapter03/ajaxtest/index.html

thank paul_wilkins
!

Can u body onload this function ? (grabFile(this.href); return false;)

You don’t even need the onload. Just move the script from the link down to its own script section near the end of the body, and get rid of the link.

i would like to studing javascript
can you for me document about javascript
i want write code javascript run by wscript.exe
can you help me ?

I can direct you to a large set of book resources from which you can learn from.