If you want to cancel a form submission through client script, then the onSubmit function should return false. You can use the following syntax to cancel a form submission through client script: