I am currently creating yet another form, and as usual, I am not sure which way to implement the "Cancel" (or "Back") button next to the "Submit" one, that allows the user to forget this form and go back to the listing page.
There are obviously many ways : you can either use a simple button or a link (or any tag with proper
onclick and styling, for that matter), and all can use
Each method has its advantage : the
back() button allows to go directly where the user was (on the 3rd page of the list sorted by name, for example), but may pop the "confirm resend" window. On the other hand, going to some url is "cleaner", but means either going to a generic one (1st page of list, default sorting), or keeping the previous url as a hidden parameter, if one wants to go exactly to the same page (3rd page sorted by name).
How do you guys handle this ? I usually use the
history.back() solution, because in my case it usually does the trick, but there may be some disadvantages to this method.