document.forms doesn't contain form refreshed by an AJAX request




10 years ago
7 years ago


(Reporter: Gerix, Unassigned)


2.0 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [CLOSEME 2010-07-30])



10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20080201 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20080201 Firefox/

I work on a project that use some AJAX request (a4j). When we refresh the form node by an AJAX request, this form is not present in document.forms array and not accessible by document.forms['myformname'] notation (but the name attribute of the form is present). It result that some third party script crash.

Reproducible: Always

Steps to Reproduce:
1.Do an AJAX request to refresh a form node
2.try to access document.forms

Comment 1

10 years ago
please provide a reduced testcase.
Summary: document.forms doesn't contains form refreshed by an AJAX request → document.forms doesn't contain form refreshed by an AJAX request

Comment 2

10 years ago
I have the same problems. After form rerender the array document.forms don't contain this form, but the array of document.getElementsByTagName('form') has all forms.

Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv: Gecko/20070914 Firefox/
Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080218 BonEcho/
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv: Gecko/20080201 Firefox/

Reproducible: Always

Steps to Reproduce:
1) Deploy war on Tomcat 6.0 .
2) Go to page http://localhost:8081/bugTesting .
3) Alert show that document.forms contains "mainForm" and "anotherForm".
4) Click on "send" button.
5) Oncomplete event alert show that document.forms doesn't containt "mainForm", but document.getElementsByTagName('form') contains it.

PS. war file with test application in the next attachment.

Comment 3

10 years ago
War file with test application can be downloaded from:
This bug was originally reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.6 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
Whiteboard: [CLOSEME 2010-07-30]
Version: unspecified → 2.0 Branch


8 years ago
Duplicate of this bug: 420709
No reply, INCOMPLETE. Please retest with Firefox 3.6.8 or later and a new profile ( If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.