retain value of radio button on the next page or previous page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rjlorenzo
    New Member
    • Oct 2008
    • 16

    retain value of radio button on the next page or previous page

    Hi to all,

    I have created a survey page that consists of 4 pages 10 question on each page. Each question are just answer using a radio button. Now my problem is i have to retain all the answer/value of radio button even the user click previous page then going back to current page. appreciate any idea please.

    thank you in advance
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    If you are referring to the web-browser's previous and back buttons you may have a few problems with this.

    When you hit the "back button" (or previous button) a cached version of the page is displayed to you. If your page doesn't use Ajax to post information back to the server it is quite usual for these pages to retain everything selected by the user during the last full page submit to the server. (Same goes for hitting the "next" button too).

    Sometimes, if you have managed to clear the user's cache (or specified that the page shouldn't be cached), or if your page uses Ajax to submit information to the server, the page will be displayed as it was originally.

    If you aren't referring to the web-browsers back/next buttons...and you have links or buttons as part of your page to help with user navigation....t hen you can store the information in Session so that it is available to all pages.

    Please explain, in more detail, what you mean by "next/previous" buttons....and explain try to explain how/why you think the information is being lost.

    -Frinny

    Comment

    • rjlorenzo
      New Member
      • Oct 2008
      • 16

      #3
      Yes I'am using a next/previous button. how i could use a session on this. can i have an basic example please.

      thank you very much and more power.
      RJ Lorenzo

      Comment

      • omerbutt
        Contributor
        • Nov 2006
        • 638

        #4
        are you using
        Code:
         <button type="submit" name="Next" value="Next" />
         <button type="submit" name="Prev" value="Prev" />
        or the buttons on the top left side of the browser
        for using session
        Code:
        Session("VariableName")=value/string

        Comment

        Working...