View Full Version : Saving programs written in Javascript
cat_evilness
08-14-2002, 03:50 PM
Okie, I am using HTML and JavaScript to write a Virtual Pet for my project at school. I need to add an option where the user can save the program and it will save the stage that the virtual pet is at and then when they reopen the proram it will be at the same stage. Can anybody help?
Cat x
x_goose_x
08-14-2002, 03:54 PM
Use cookies. Search google.com and you'll find a tutorial.
Skyzyx
08-14-2002, 03:54 PM
Use "Cookies"
http://developer.netscape.com/docs/manuals/js/client/jsguide/advtopic.htm
cat_evilness
08-14-2002, 03:59 PM
huh.. is there no way that you can activate the save option in the file menu??
Skyzyx
08-14-2002, 04:01 PM
Nope. If you did that, you'd be saving the webpage, but none of your variables. To save the values of your variables (which is what controls your v-pet), you need to save them into cookies.
cat_evilness
08-14-2002, 04:06 PM
Thankyou.. will have to learn how to use cookies then!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.