472,334 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,334 software developers and data experts.

Object doesn't support property or method

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,

Feb 28 '07 #1
2 3719
On Feb 27, 5:05 pm, "Charles" <landema...@gmail.comwrote:
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,
Hm. I'm not inclined to debug your code for you, but to make your
life easier, you should know about a few tools:

Microsoft Script Debugger
http://www.microsoft.com/downloads/d...displaylang=en

Firefox:
http://getfirefox.com

Firebug:
http://getfirebug.com

(though it looks like your error is IE-specific...)

My hunch is that yout "onsubmit" handler is invoking form.submit,
which is unnecessary. Just return true.

-David

Feb 28 '07 #2
On Feb 28, 11:05 am, "Charles" <landema...@gmail.comwrote:
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

Feb 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matt | last post by:
I tried to display all html control types in the form. But it has run time error "object doesn't support this property or method" on...
2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example...
3
by: news.onetel.net.uk | last post by:
I and my friend Karl have spent literally all day trying to find out what is causing my error but we are zapped of any further functionality :) I...
54
by: tshad | last post by:
I have a function: function SalaryDisplay(me) { var salaryMinLabel = document.getElementById("SalaryMin"); salaryMinLabel.value = 200;...
0
by: fniles | last post by:
I created a CAB file for a 3rd party control (StockChartX) it using CABARC.exe that comes from Microsoft SDK. In the CAB file I included the...
7
by: stellstarin | last post by:
hi all, I have a HTML page with two forms. While trying to add a hidden element in a first form by the default javascript function, the error...
5
by: John Olbert | last post by:
Subject: Error is Object doesn't support this property or method I am trying to pass a C# string under Vs2005 (Net2) to an Vb6 ActiveX Control. ...
8
by: Kevin Blount | last post by:
I'm tyring to access an object created by using a method from a third party API. The documentation tells me what object should be return, and the...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions...
9
by: Peter Webb | last post by:
I want to animate one object moving in front of another. I cannot re-render the background as the object moves, as it would be extremely time...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.