The following HTML code is throwing error message.
<button name="btnSave" id="btnSave" onclick="/chbs/adm/HallNamesValidation.jsp"
class="btn btn-success">Save to Database</button>
The error:
Uncaught SyntaxError: Invalid regular expression flags
I am attempting to invoke HallNamesValidation.jsp without using <form action=""> because there are other <button>s on the page.
I have managed to get it working using AJAX as follows, but I'd like to know how I can make this work using my original method because with Ajax I need to add data which is an array to be processed with jsp getParameterValues():
$('#btnSave').click(function() {
$.ajax({
url: '/chbs/adm/HallNamesValidation.jsp',
success: function (data) { console.log(data); }
});
});