[thelist] JavaScript Form Validation
Jason Handby
jasonh at corestar.co.uk
Wed Jul 16 11:15:27 CDT 2003
> This little script works great, except when it hits the
> form.submit(); line,
> and then it returns an error: "Object doesn't support this property or
> method." And if I replace
>
> else {
> form.submit();
> }
>
> with a simple "return true;" then the form never submits. I should also
> add, here's the form tag:
>
> response.write " <form name='form' action='fubar.asp' method='post'
> onSubmit='simpleCheck(this); return false;'>"
Hi Casey,
Try replacing form.submit() with a simple "return true;", and then amending
your form tag to read
<form name='form' action='fubar.asp' method='post'
onsubmit='return simpleCheck(this)'>
(i.e. putting "return" in front of the function call, and removing "return
false")
Jason
More information about the thelist
mailing list