Preventing an onSubmit event from reloading the page