View Full Version : saving with javascript

12-18-2003, 01:43 PM
Is it possible for javascript to save text or html and later retrieve them using the same javascript. if so, can anyone show me a working script.......

12-18-2003, 02:03 PM
Well you are really limited to this with JavaScript since you are not able to save more to a cookie. With IE you can find an active-x control that might let you write to a text file, but you are only targeting you IE audience.

If you are able to use a server side language then that is your best bet to save the file, but you can experiment with using cookies to hold information. You can not hold very much in a cookie, but it is something better then nothing.


12-19-2003, 08:27 AM
What you're looking for can be accomplished with php. Using cookies is a resourceful idea but not every viewer has cookies enabled. And also, they are limited to exactly 4 kb (4096 bytes).

12-19-2003, 09:54 AM
IE also has a userData Behavior (http://msdn.microsoft.com/workshop/author/behaviors/reference/behaviors/userdata.asp), which can persist more data than cookies, though not a tremendous amount...

12-22-2003, 09:53 AM
Thanx for the reply....I wasn't too sure about that stuff....

Thanx again