sail3005
Mar 14th, 2001, 05:03 PM
you can't open up a text file using JavaScript. Plain and simple...
To expand on what Sail was saying, JavaScript is ran on the Users computer. That is why it can't do those types of things. The functionality is left out of it because of security reasons.
Now, to open files on the server, before the html is sent to the user, use either JavaServerPages, or ActiveServerPages. These both run at the server, then the output is sent as HTML to the user.
You can get tricky and open a text file in ASP and write those variables to a embeded javascript, all before the HTML is sent to the user. That would be a way to over come that limitation. This will allow you to have updated variables each time the page is called.