Retain Checkbox Value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete

    Retain Checkbox Value

    Just a quick question regarding the way to do something rather than the
    actual code :-

    I have a page which has some links that go through to a HTML form and
    each link will check a certain checkbox. I want the form to retain the
    checked status of any checkboxes that are set to checked when the user
    goes back to the previous page.

    Would this be best done using sessions or is there another way I could
    use? I don't mind using sessions as I have used them before. I would
    like to avoid using cookies but I don't really have any strong
    objections to using them, it's just that they're not 100% reliable (but
    then, what is?).

    TIA,

    Pete.

  • Pedro Graca

    #2
    Re: Retain Checkbox Value

    Pete wrote:[color=blue]
    > I have a page which has some links that go through to a HTML form and
    > each link will check a certain checkbox. I want the form to retain the
    > checked status of any checkboxes that are set to checked when the user
    > goes back to the previous page.[/color]

    Disable caching for the HTML form with the checkboxes and use session
    variables to hold their status.
    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    • Chung Leong

      #3
      Re: Retain Checkbox Value

      Well, if the users are filling a form, presumbly you'd be storing what they
      entered somewhere, right? Reload that data and check the checkboxes based on
      that.

      Uzytkownik "Pete" <skredding_no_s pam_you_tw@s_ne tscape.net> napisal w
      wiadomosci news:dlwXb.1334 9$ul3.295@news-binary.blueyond er.co.uk...[color=blue]
      > Just a quick question regarding the way to do something rather than the
      > actual code :-
      >
      > I have a page which has some links that go through to a HTML form and
      > each link will check a certain checkbox. I want the form to retain the
      > checked status of any checkboxes that are set to checked when the user
      > goes back to the previous page.
      >
      > Would this be best done using sessions or is there another way I could
      > use? I don't mind using sessions as I have used them before. I would
      > like to avoid using cookies but I don't really have any strong
      > objections to using them, it's just that they're not 100% reliable (but
      > then, what is?).
      >
      > TIA,
      >
      > Pete.
      >[/color]


      Comment

      Working...