Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: check boxes

  1. #1
    New Coder
    Join Date
    Jun 2011
    Location
    united kingdom
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    check boxes

    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

    cheers

  • #2
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    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.

  • Users who have thanked bullant for this post:

    squish (08-05-2011)

  • #3
    New Coder
    Join Date
    Jun 2011
    Location
    united kingdom
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts
    hi, thanks for the advise, i am very new to this.
    im looking for the code. any sites i can get one from?
    cheers


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •