[Javascript] Form has no properties....
John B. Moore
jbm at microps.com
Fri May 6 19:19:49 CDT 2005
This is not the common problem for this error.. Or at least, based on
googling all issues related to this error I have not found any of the
normal "fixes" apply..
I have a very complex JSP application (Java Server Pages) that has an
online Invoicing module. This Invoice is a frameset with two frames..
One is hidden and used to send XML streams back to the server that
returns XML results to dynamically populate popup lists, product details
and such.. The other frame is the invoice proper and is all the user
can see.. I've used this technique for years...
(Note that previously I have always used the "document.location =
'some.url.here?data=value' " technique to post these forms.. but because
of longer "notes" fields now required I must use the form post technique)
Under a specific sequence of actions that seem to involve the "submit()"
method, the browser seems to "get lost" with respect to the form
objects, such that the following simple code fails..
top.InvoiceFrame.document.theForm.COMMON_NAME.value = "IT WORKED...."
with the error..
"top.InvoiceFrame.document.theForm has no properties.."
..to all appearances (view source..etc..) all of the objects are there,
but the browser appears to nolonger able to reference these objects..
this was tested on Mozillia 1.6, 1.7, Mac IE6, and Thunderbird with
similar results (IE worded the error a bit differently..)
Moving to any other application page using the technique..
document.location = "some.URL.here?data=value"
..and back to the invoice fixes the "lostness" of the DOM and the above
code then works again..
I have been beating on this for over a week and still have not found
what it is that might throwing it off..
Several clues or conditions seem to apply..
1) a javascript submitt() of a form object..
2) The browser location field does not change as a result of going to
the newpage from this submit() post..
I have been building JSP web applications with liberal use of Javascript
for nearly 10 years and this one has me stumped.
I'd be happy to supply any further info, but for the momment I not even
sure were the problem lies..
Does this ring any bells with anyone...???
Thanks for any suggestions or WAGs (Wild Ass Guesses)
John Moore
More information about the Javascript
mailing list