This is the piece of code that is throwing the error:
<div align="right">
<input class="btn btn-primary" type="button"
value="Confirm and Process Payroll"
onclick="@{Payroll.confirmAttendance()}">
</div>
which after compiling looks like
<div align="right">
<input class="btn btn-primary" type="button"
value="Confirm and Process Payroll"
onclick="/confirm">
</div>
Cannot seem to find out what is causing that error. I also use twitter bootstrap. Could there be a clash? This piece of code lies inside a jQuery accordion.
EDIT: However, if I change the input tag to an anchor tag, it works fine.
onclick="/some-url"doesn’t make any sense for the JavaScript insted you should put there call to some JavaScript method ie:onclick="processConfirmation()".Of course you need to create and include that method.
What’s more if you’re using jQuery, you can also use its selectors and events for firing JS actions: