aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Object does not support property error! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Object does not support property error!" Watch "Object does not support property error!" New topic

Object does not support property error!

Natalie Ap
Ranch Hand

Joined: Jan 09, 2009
Posts: 49
Hi all,

I am trying to run the following piece of code, but I am getting a javascript error "Object does not support property error!" and I am unable to understand what the problem might be.

There is a form called "updateForm" which I am trying to submit when i get the error. When I comment lines (1), (2), (3), the error does not get thrown. Please help me!!

Please let me know if you need any other information besides this.


Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Well first problem is document.all is IE only.

You should be using document.formName.elementName or
You should be using document.forms["elementName"] or
You should be using document.forms[0].elementName or


Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Eric Pascarello wrote:document.forms[0].elementName
This is not specific enough, I wouldn't use it.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60057

I agree. The [0] notation is rather old-fashioned and is fragile. Avoid it.

id values allows you to specifically target an item without ambiguity.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Object does not support property error!
Similar Threads
dynamic text box value into database
Using JSTL Data Displayed In Browser Is Getting Fixed To 24576 Bytes(24 KB)
javascript error: object expected
Implementation of google charts in JSP
How to pass JSTL value to javascript function