display error message in jsp
Have a jsp page that contains a button (<input type="submit" name="doThis" onClick="someFunction(field, arg2)"/>, when clicked it passes to params to a function that looks like this:
function somefunction(field, arg2) {
for (i = 0; i < field.length; i++) {
if (field[i].checked) {
return true;
}
}
alert("At least one checkbox must be selected");
return false;
}
How can I change this so that the alert message is shown in the browser (no pop-up) using jquery?