JM Rosengard wrote:
Hi,
It seems that unlike other browsers, Safari will submit a form even
when the onsubmit event handler returns false. e.g. <form
onsubmit="return false" ...>
Is there a workaround to prevent the form being submitted?
First ya gotta prove that what you claim actually happens. For me in
Safari 1.0.3 the following form does not submit:
<script type="text/javascript">
function doSubmit(f){
alert('the onsubmit fired');
return false;
}
</script>
<form action="" onsubmit="return doSubmit(this);">
<input type="text" value="Change me and submit...">
<input type="submit">
</form>
But maybe you are submitting the form or trying to cancel submit some
other way?
--
Rob