how to retain display after moving back then forward in history

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jay_dev
    New Member
    • Jul 2006
    • 10

    how to retain display after moving back then forward in history

    i have this slight of problem
    my page displays a div tag each time a new info is inserted
    but if i hit the back history button,move back to an earlier page then come back to the one i was working on, the divs are no longer displayed
    is there a way to retain them like in the browser's cache or elsewhere ?

    I Need to accomplish this fast please !!
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    use sessions or a database.

    Comment

    • jay_dev
      New Member
      • Jul 2006
      • 10

      #3
      how ?
      in my code i cache values entered by user in hidden fields that are added to the div content. User can also remove a div he has added, so i've set up a counter that gives me the div id each time one is added it is incremented and decremented when one is removed
      So i'd have

      '<input type="hidden" name="qty" ' +id_of_the_div + ' value=" ' + entered_value + ' ">

      So how can i use session to retain those values
      please help me if you can

      Comment

      • jay_dev
        New Member
        • Jul 2006
        • 10

        #4
        Loosing Display on HISTORY.BACK()

        hi
        here's my problem
        i'm trying to create somthing like a shopping basket ,
        i have a menu where users pick what ever they want and whatevere they pick
        i append it as a div child of a master div tag existing in my document.
        So im creating child DIVs every time a choice is made and removing'em when
        choice deleted. Assume this is Page1

        the problem is that when the HISTORY BACK button of the browser ( Page0) is clicked all these created DIV tags ( the children) disappear when press Forward to go back to Page1 so everything done by the user is lost

        is there a way to resolve this?

        Comment

        • iam_clint
          Recognized Expert Top Contributor
          • Jul 2006
          • 1207

          #5
          record the information in sessions and then if those variables aren't empty then re run the script with the variables. or use variables in the windows location

          Comment

          Working...