See following(first) attachment. The first script doesn't work because document.form1 has no property. But in the second form(form2), only difference with form1 is there are some text after the hidden input. Very interesting problem... But I'm not sure whether this is a known but, just file it as UNCONFIRMED. Could anyone confirm it or tell me which but it duplicate with?
Summary: document.form doesn't work if only hidden input in the form → document.form doesn't work if there are only some hidden input field in the form
*** Bug 153541 has been marked as a duplicate of this bug. ***
You test case starts with <html></body> If you correct this with <html><body>, the test case will work corectly.
To parser since this looks like a parsing issue
Assignee: rods → harishd
Component: HTML Form Controls → Parser
QA Contact: tpreston → moied
The first testcase is the only relevant one; the rearranging of the content model seems to trip up the form, although I don't quite understand how.
Keywords: compat, testcase
I see this, WinXP 2003012908.
Status: UNCONFIRMED → NEW
Ever confirmed: true
It looks like the parser has explicit code to handle the following case: If we have not seen a <body> tag and we see a <script> tag, move that <script> tag over under the <head> tag. In the process, the <script> is actually appended to the document _before_ the <form> is, which causes all sorts of fun stuff to happen. See CNavDTD::HandleStartToken I suspect that code is there for a reason, and that removing or changing it should not be undertaken lightly...
*** This bug has been marked as a duplicate of 178258 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.