Object doesn't support property or method

R

RobG

I have a validation script used before submitting a form. When
executed it says "Object doesn't support property or method". I'm
using onclick="return validate();" which should be fine. But when you
click "Submit", you get this error:http://www.auriance.com/docs/tmp/nutrinat/pedido_.php
Any idea?
Thanks,

Here:

<input name="submit" type="submit" class="send" id="send"
onclick="return validate();" value="Concluir pedido" />

Firstly, assign the validation function to the form's submit
attribute, then when it returns false it will stop the form
submitting.

Secondly, by calling the button 'submit' you mask the form's submit
method. Don't give control's a name unless you intend to submit its
value with the form, and never call a control "submit" (or reset or
any other method or property of a form).

When your functions calls "form.submit()" it is trying to execute the
button, not the form's submit method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top