I'm simply trying to create an HTML button that has two onclick
events, but the issue is that the second one is not responding properly. Here is the button tag below:
<input class="btn btn-default btn-responsive" type="button" onclick="return confirm('Cancel Changes?'); location.href='${cancelLink}'" value="Cancel Changes"/>
I must be doing something incorrectly due to the expression language in location.href, but I'm not sure what it is since I'm very unfamiliar with using expression language in these instances. I do know that this link is working though, because if I use it in an 'a' tag with an href=${cancelLink}
, it works. Any help would be appreciated.