Jump to content

Createing a cookie for Checkbox


Agent Moose

Recommended Posts

Without writing the code, these are the steps I would take:

  1. When the form is submitted, check to see whether or not the checkbox is checked.
  2. Write that value to the cookie.
  3. The next time the page is loaded, check for the existence of the cookie.
  4. If the cookie is present and the value indicates that the checkbox had been checked, then the checkbox was checked. Otherwise, the checkbox wasn't checked.
  5. Access the checkbox through the DOM and set its checked property to true or false depending on the findings of the previous step.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...