Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 19th, 2004, 10:41 PM
Coretys Coretys is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 Coretys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool 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

Reply With Quote
  #2  
Old March 20th, 2004, 04:23 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
I would probably use the first method - i.e. the user completes their form, the data is written to a DB if required, then outputted into a text file. You push the file to the user (i.e. redirect the user to the file) which will ask them for the save location.

Alternatively, you could just mail the data to the user.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Save text file on client computer (no hack!)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT