I'm trying to make a function that displays a confirm box when someone clicks on the 'submit' button of a form, then if they click ok it submits the form and if they click cancel it resets it. atm i have this:
code:
function submit_form(id) {
var formid = getElem(id);
if (confirm("blah")) {
formid.submit();
}
else {
formid.reset();
}
}
But it doesn't display the confirm box at all
can anyone help?