Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1064 by lucas.e.smith: document.forms and formNode.fieldName and formNode.elements.fieldName[0] return undefined
http://code.google.com/p/google-caja/issues/detail?id=1064

Accessing form elements is only partly working and only via the
formNode.elements collection.  The document.forms collection is not
supported, nor is direct field or field group access as properties of the
form node.

Also, and more importantly, you cannot access checkbox 2-n or radio 2-n via
elements.radioName[index].  elements.radioName is the first radio, not a
collection of inputs with the supplied name.

What revision of the cajoler exhibits the problem?  On what browser and OS?
Mac OS X 10.5.7.  FF 3.0.(latest)  I haven't tried other browsers yet.
Unsure about the build#.  The build should be the head as of 7/1/2009 with
some minor patches added by felix.

What steps will reproduce the problem?
A simple test page is attached.  Any of these:
document.forms
formNode.someFieldName
formNode.elements.someFieldName[someIndex]

What is the expected output? What do you see instead?
document.forms should return a collection of forms on the page
formNode.someFieldName is shorthand for formNode.elements.someFieldName
formNode.elements.someFieldName[someIndex] should return the someIndex-th
input with the name someFieldName (important for radio groups and checkboxes)

Please provide any additional information below.
Pre-cajoled repro page attached.

Attachments:
        basic.html  1.3 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply via email to