Currently I have 2 pages based on the following URL MyNewApp/purchase
and MyNewApp/confirm
. On the 2nd page that is /confirm I added a back button with the following
HTML
<button type="submit" class="btn" id="back">
Go Back
</button>
JS
$('button[id="back"]').click(function() {
this.form.action="backToPurchase";
this.form.method="GET";
});
After pressing the back button everything works fine except the URL changed to /MyNewApp/backToPurchase?_method=
. How can I set the URL to /MyNewApp/purchase
after pressing the back button ?