I´m working with a purchase process. The process consists of 4 steps. The first two steps is where we take in all customer data. The 3rd step sends the data to our servers with AJAX and then shows a payment form. After payment the customer is thanked in step 4.
My question is about Step 1 and Step 2. Right now all these steps are on the same page. I have one form divided into two <div>
's. In the first step the second div is hidden (css: {display:none;}
) and when the customer goes to step 2, the first div is hidden with jQuery hide()
and the second div shown with jQuery show()
.
My problem is that I want the customer the possibility to go back to step 1 using the "back"-button in the web browser, which obviously not work right now. Is there any pure JavaScript solutions for this? We will demand our users to activate js anyways. Or is it better to start using sessions? The site is based on PHP.
We'll see if there is anyone that understand my thoughts and problem..