I'd like to submit a form and go back to where the user came from using a button in HTML. My button looks like this:
<input type="submit" value="submit" onclick="history.back(-1)" />
The form gets submitted but the onclick doesn't redirect. Is there an easy way to do this or do I need to create a JS function or do something server-side?
<input type="submit" value="submit" onclick="window.location.href=history.back(-1)"/>
- Abhinava B N