The HTML form shown below does not work as expected in Opera (Version: 9.52). The form does not have an onsubmit attribute nor does it have an input element with type=submit. It just has two input elements of type=button and both of them onclick calls a js method where I want the user to confirm the submission. If I remove the confirm() call, it works perfectly fine. And in all other browsers (FF2, FF3, IE7) it is working fine.
Any pointers ?
<script type = "text/javascript">
function userSubmit(submitStatus)
{
// Omitted code that uses the parameter 'submitStatus' for brevity
if(confirm('Are you sure you want to submit?'))
document.qpaper.pStatus.value = something;
else
return;
document.qpaper.submit();
}
</script>
<form name = "qpaper" method = "post" action = "evaluate.page">
<input name = "inp1" type = "button" value = "Do This" class = "formbutton" onClick = "userSubmit(false)">
<input name = "inp2" type = "button" value = "Do That" class = "formbutton" onClick = "userSubmit(true)">
</form>