08-05-2011, 02:25 AM
hi guys, i have been searching everything i can think of online but cant find anything.
im trying to make a check boxed list were if someone checks the box it stays ticked when the user refreshes or leaves and returns to the page.
any help would be much appreciated
08-05-2011, 02:46 AM
There's a few ways you can do this:
1) when a check box is clicked, set a cookie to store its current checked status (true or false). Then on every page load, read any existing check box cookies and set the checked status of the corresponding checkbox to the value of the cookie.
2) when a checkbox is clicked, run an ajax function that sends the status of the checkbox to a server side script that then stores the status in a session array. On every page load, loop through that session array and set the checked status of each checkbox to the corresponding value in the session array.
08-05-2011, 11:54 PM
hi, thanks for the advise, i am very new to this.
im looking for the code. any sites i can get one from?