Onclick javascript to make browser go back to previous page?
Add this in your input element
<input
action="action"
onclick="window.history.go(-1); return false;"
type="submit"
value="Cancel"
/>
history.back()
or
history.go(-1)
Put this to the button onclick
handle. It should look like this:
<input name="action" onclick="history.back()" type="submit" value="Cancel"/>