Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Any ideas on how to take a htm with forms and use the form action to input the data to a text file? I thought it was easy until I can't find a script already written to do that.
I want the user to input any of a number of pull down choices and then, on submit, make a txt file that includes return charactors at each line end and has some delimiter/comment charactors in various places. It should run from local machine and save to local machine to start.
Would another approach work better. A requirement is that things like excel and other databases can't be used.

Not only is it not easy, it's not possible :-)
The browser won't let the web page create any files except cookie files on its hard drive...Too much of a security risk. If you can do a server side scripting language (php, asp, asp.net, perl, cold fusion, etc.), then the closest you could get to this would be to have the action point to your script, then have the script send it as an attachment to the browser. The browser would then ask the client whether or not they wanted to save it. If this is an option for you, let us know what server side scripting languages you have available and we'll get you started.
No matter what you do, you'll need to have server-side scripting to process forms. You can cheat and have the action be a mailto: link which works some of the time, or you can use a service like hostedscripts.com that allows you to use their server side scripts.
Good luck,
-SN

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |