1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to retain checkbox value after refresh?

Discussion in 'JavaScript' started by actto, May 11, 2010.

  1. #1
    hi guys,

    Is there a way to retain the checkbox value (in js) after refresh?
    There is a checkbox in this form. When the page is refreshed, the checkbox data disappears.
    Is there a way to refresh the page, while keeping the checkbox data?

    I have a window (#1) with a form and checkbox. #1 has a link to pop up another window (#2) with another form. When the form on #2 is completed, #1 is refreshed.

    My project is a combination of PHP and JS..please help

    Thank you.
     
    actto, May 11, 2010 IP
  2. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #2
    you may want to use session or cookie :)
     
    gapz101, May 11, 2010 IP
  3. actto

    actto Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can u give me example? sorry.. i'm new to this..
     
    actto, May 12, 2010 IP
  4. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #4
    no, after your form(#2) is submitted, you also have to save the state for #1 that it's checked, so by the time #1 is refreshed, check if you have that state checked .. gets? sorry i can't explain that much...
     
    gapz101, May 12, 2010 IP
  5. bprashanth.gi

    bprashanth.gi Active Member

    Messages:
    55
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #5
    Just google about how to maintain session state AND then read about cookies and then you'll understand how to solve your problem by yourself. Trust me, it shouldn't take more than a few hours.
     
    bprashanth.gi, May 12, 2010 IP