href="#" onclick="closeOrCancel()
and history.go(-1)
in that js method doesnt work in Chrome (neither history.back()
)
It works with href="javascript:closeOrCancel()"
, but Opera doesn't allow href="javascript:...
How to make history go back using onclick= "myFunction()" ?
Edit: closeOrCancel()
returns false
Adding a return false;
to the onclick
code seems to be enough:
<a href="#" onclick="closeOrCancel(); return false;">Go Back</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With