
March 19th, 2004, 10:41 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Save text file on client computer (no hack!)
Hi there,
The user on my webpage will "create" a large amount of data that should be saved on his computer after finishing his work. It probably doesn't fit on a cookie so I would like to make it as easy as possible for the user (and for me) to save this data on his computer. I had the following ideas and need some input on how to do it:
1. I display his data in raw on a new page that is not HTML but just PLAIN TEXT, and the user then can save it as is on his computer. The browsers URL address should display something like:
URL
Then the user presses "Save" and chooses a file location, etc.
- Can I set the url like I need to? (with the extention ".txt"?
- I think I can output data in plain text format, so tag-like expression will not be treated as tags?
2. I could display the data in a textarea tag and the user copies the whole contents into notepad and then save it. That is the easiest way for me, but not very elegant.
3. Create a file on the server and then let the user download the file. After downloading the file should be destroyed right after the download is complete. Probably I have to create a "finish" button for the user. But what happens if the user doesn't press the button?
The whole subject is rather new to me, so any ideas would be very helpful.
Thanks for your help ...
Coretys
Last edited by Coretys : March 19th, 2004 at 11:02 PM.
Reason: typo
|