Welcome to WebmasterWorld Guest from

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)

10+ Year Member

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)

10+ Year Member

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)

10+ Year Member

Oh ok.


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

WebmasterWorld Senior Member 10+ Year Member

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)

10+ Year Member

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)

10+ Year Member

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)

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

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

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


Featured Threads

Hot Threads This Week

Hot Threads This Month