Forum Moderators: mack

Message Too Old, No Replies

How do I save which Checkboxes are selected?

In my to do list, I want to save what is checked, even with closing .

         

SchoolMom

5:56 pm on Sep 11, 2003 (gmt 0)

10+ Year Member



I have a simple to do list using checkboxes.
I know a bit (a very little bit) of java script and I use that with the submit button to check if the entire list is completed. I want to be able to click a save button and have the list remember what was checked, even when I close the browser. I am doing all of this on my hard drive. It is not on my server. I am just starting to learn HTML and I did take a class in JavaScript. I saw someone else asked this question at:http://www.webmasterworld.com/forum88/1313.htm
but I was blown away with the answers. Can anyone tell me where to begin?
Thanks

jatar_k

3:43 pm on Sep 12, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld SchoolMom,

What my little old php scripting forum scared you? ;)

When you start working with files and forms and start adding more server side functionality to a website you need to start using some type of scripting language.

They are definitely very overwhelming at first so don't take my first line to heart, everyone feels exactly the same way. I hear the same thing as much from long time pros as from those who are new to the game.

ok, where to begin. Well, you need to begin with the form which it sounds like you've done. You can probably do the saving of options in a cookie using javascript actually. That would keep you from needing php right away.

You can set the cookie when the user hits the save button. When the page is loaded you can test for the existence of the cookie and, if it is there, load the data from it into your page.

I looked for a good cookie tutorial but couldn't really find one that I thought would be really good for you. If you took a course it should be in your book or you may have covered it.

SchoolMom

10:27 pm on Sep 12, 2003 (gmt 0)

10+ Year Member



I have heard of php. Once. Thanks for the reply. I guess I will search of how to make a cookie. Thanks again.

davegerard

6:40 am on Sep 25, 2003 (gmt 0)

10+ Year Member



I thought all school moms knew how to make really good cookies :-)

Alternatively, you could delve into some ASP and writing the results of your check boxes to a text file, but then you would have to know a bit about hosting sites with IIS (Internet Information Services), which just so happens comes included in Windows 2000 and XP.