Back button and a Post form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hennie de Nooijer

    Back button and a Post form

    Hi everbody,

    Situation
    I created webpage with a receipt with javascript so when someone
    orders something from a product list a item is registered on the
    receipt. This works fine now.

    The next thing which i created is that the receipt works over multiple
    pages. So when someone pushes a link i read some hiddenfields
    (generated with javascript) into sessionvariable s and a redirect to
    proper page has been done. The sessionvariable s are read, put into a
    javascriptarray and are shown in the receipt

    The problem
    In short the back button (and the refresh button). Off course when
    someone chooses the products and pushes back, the hidden fields are
    not read by my "session handler". consequence is that the chosen
    products are not shown in the receipt.

    Help
    What can i do? What are my options? Could i put the session handler in
    the history? But then a POST (submit) must happen because the hidden
    fields are in a form.

    I had this problem earlier with another website but then it wasn't
    that annoying but now it's not acceptable for me and i want to find a
    solution for this.

    I saw on a website that, i think, was also created with javascript,
    and every action is in the history registered somehow....

    Greetz,
    Hennie
  • Evertjan.

    #2
    Re: Back button and a Post form

    Hennie de Nooijer wrote on 15 jul 2003 in comp.lang.javas cript:[color=blue]
    > The problem
    > In short the back button (and the refresh button). Off course when
    > someone chooses the products and pushes back, the hidden fields are
    > not read by my "session handler". consequence is that the chosen
    > products are not shown in the receipt.[/color]

    Address the sourse of the problem, which is the design of your page, not
    the backability.

    For instance, try to refresh from the server and use server variables to
    detect the state and redirect when necessary.
    Hangt af van je server programmeerbaar heid.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    Working...