Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Checkbox cookie help needed.
Topic Started: Nov 26 2008, 10:18 PM (420 Views)
volksdevil
Member Avatar
Volkswagen/Audi nutter!
 *   *   *   *  
Im after using a cookie for a simple checkbox, if a forum member checks the checkbox, i would like a cookie to remember it for next time they come back. And also to remember if they uncheck the checkbox.
I know nothing about cookies though. :$

Here is the checkbox:
Quote:
 
<input id="toggleButton" onclick="toggleBox()" type="checkbox" />


Here is the javascript im using with it:
Quote:
 
<script type="text/javascript">
function toggleBox()
{
var button = document.getElementById("toggleButton");
var box = document.getElementById("ShoutBox");
if(button.checked)
{
box.className = "expanded_box";
}
else
{
box.className = "normal_box";
}
}
</script>


Can anyone help?

Thanks.
Offline Profile Quote Post Goto Top
 
volksdevil
Member Avatar
Volkswagen/Audi nutter!
 *   *   *   *  
Bump ^_^
Offline Profile Quote Post Goto Top
 
JFK
Member Avatar
Member
 *   *   *  
Have you done a search for sites such as THIS ?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply