View Full Version : Post Form to a Text File

08-04-2002, 07:19 AM

I am trying desparately to find a JavaScript or something to use to Post the results of a form to a text file/csv file/spreadsheet on the server.

The problems I am encountering are:
I cannot run perl scripts on the server.
I cannot run FrontPage Extentions on the server.
I cannot link to a perl script run on another server.

I should explain why this is...
The site I am developing is a closed site for an intranet.
i.e. no access to outside connections.

All I want is a simple script that will post the results of a form to a text file and then redirect the user to another page.

Please help..


08-04-2002, 02:11 PM
what about asp, it's easy but you need pws or iis. If running either you can do it easy.

08-04-2002, 02:25 PM
Generally spoken, JavaScript can neither

a.) Process forms submitted with the POST method.
b.) Read, write, copy, delete, look up any files.

You see, JavaScript was designed to run on the client side of webbrowsers, although there is a server-side version of javascript developed for the NES I believe.

There is a workaround for IE browsers running on newer windows platforms. The FileSystemObject lets you gain access to file writing functions. Try to google that up or do a search on msdn.com to find more info.

08-04-2002, 02:45 PM
I never knew that you could use FileSystemObject in js...

08-04-2002, 04:24 PM
Actually you can not use it generally; just in very confined environments. As I said, you need IE on a newer windows installation and have security settings adjusted to enable ActiveX scripting, so this approach can't be effective for the common website... but in a company intranet it might work.

Though I would seriously go for a server-side language in this particular scenario web_nz described.

08-05-2002, 08:08 AM
Back to the first comment... ASP.

I have used ASP but not very much.

Is there an easy way to do what I am needing with ASP.

Could you shed some light on it for me please.

:) :)