Welcome to WebmasterWorld Guest from 54.196.233.208

Forum Moderators: open

Message Too Old, No Replies

Any easy way to save text files with javascript?

     
6:31 pm on Apr 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Apr 5, 2003
posts:17
votes: 0


Are there any simple ways of doing such a thing other than with vast sums of code for cookies (a "save()" method, perhaps)?
7:14 pm on Apr 11, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Nov 19, 2002
posts:372
votes: 0


i don't think so
do u wish that so many website can save text to your harddisk?
and even overwrite files

an webpage with our user permit can never access user resource

7:16 pm on Apr 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Apr 5, 2003
posts:17
votes: 0


Oh ok.
8:55 am on Apr 12, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 10, 2001
posts:793
votes: 0


What do you need to do this for?

IE has a very useful (proprietory - slap!) feature called persistence which can use the userdata behaviour that allows you to store quite sizable chunks of information on the client (I think it's up to 512k for trusted sites, and a more reasonable 128k for restricted)

Introduction to Persistence (MSDN) [msdn.microsoft.com]
UserData behaviour (MSDN) [msdn.microsoft.com]

Obviously this is IE only and I wouldn't recommend it unless you really have to and can guarantee a 100% IE audience, or if it just offers useful 'extra' functionality for IE users - I have found it to be very useful in these cases.

11:12 pm on Apr 12, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 10, 2003
posts:188
votes: 0


Please explain your intended application further.

The answer is yes, but there are all kinds of considerations that come into play.

12:20 pm on Apr 13, 2003 (gmt 0)

New User

10+ Year Member

joined:Apr 5, 2003
posts:17
votes: 0


I want a javascript method to save variables from a downloaded HTML file (not online) into text format and another to read the text files and load the variables into the HTML file upon the user's command. Perhaps even just one which could do this from one fixed text document, not even save a new one.
8:47 pm on Apr 13, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Here's a tutorial from HTMLGoodies about passing javascript variables [htmlgoodies.com].

It might give you some idea for how to approach your solution.