Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Object doesn't support property or method

Reply
Thread Tools

Object doesn't support property or method

 
 
Charles
Guest
Posts: n/a
 
      02-28-2007
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,

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      02-28-2007
On Feb 28, 11:05 am, "Charles" <landema...@gmail.com> wrote:
> 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.


--
Rob

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object doesn't support this property or method JohnE ASP .Net 1 03-09-2010 06:18 AM
User control is GridView causing Object doesn't support this property or method exception Joe ASP .Net 3 12-10-2007 01:03 AM
JScript: object doesn't support this property or method zdrakec ASP .Net 0 09-26-2007 08:02 PM
Error: Object doesn't support this property or method Roman ASP .Net 0 01-04-2004 04:50 PM
Client Side, User Control "Object Doesn't support this property or method" todd ASP .Net 3 10-16-2003 06:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57