Use form.onsubmit instead of on enter key