[thelist] javascript: Form validation error?

.jeff jeff at members.evolt.org
Thu Jun 6 15:26:01 CDT 2002


scott,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: AtdtXav
>
> What's wrong with this picture?
>
> [snip]
>
> <FORM enctype="multipart/form-data"
>       name="fform"
>       action="/servlet/UploadProcess"
>       method="post"
>       onsubmit="return checkform(this);">
>
> // details of form
>
> <input
>  type="image"
>  name="SubmitUpload"
>  src="/images/submit.gif"
>  hspace="0"
>  vspace="0"
>  border="0"
>  onClick='submit();'>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

remove the onclick event handler from your image submit.  the submit()
method causes the form to be submitted without firing the onsubmit event
handler in the <form> tag.  what's more, the onclick event handler is not
supported by some browsers.

here's an article with more info on the submit() method.

Forms & JavaScript Living Together in Harmony
http://evolt.org/article/thelist/17/28553/

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list