GlesgaMick wrote:
[color=blue]
> Ok, it must be one of the most fundamentally useful things in a programming
> language, to be able to read and write files.[/color]
Depends on the programming language and its environment.
[color=blue]
> I want to know how i can do this in Javascript. I want to open a text
> file, use it to fill some variables on a webpage. And have that webpage
> save any changes.[/color]
If its running on your local computer, yes, under certain limitations.
If its a Windows based IE, you can use the FileSystemObject to read
files from the local drive and then save them, with security permission
given.
If you want to read/write files on a server, you can read them with an
HTTPRequestObject but JS has no ability to write files on a server, you
have to do that on the server.
[color=blue]
> Is there a single command like the C fopen("filename", "ra");?[/color]
Depends on where the files are. Whether they are on the users computer
or on the server. The FileSystemObject ActiveX in MSIE on a PC can do
that. Search MSDN.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?