Closed Bug 144780 Opened 22 years ago Closed 15 years ago

No javascript access to illegal form

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bts, Unassigned)

References

()

Details

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:0.9.9) Gecko/20020311
BuildID:    2002031114

From button in Form 1, no access is possible to a form 2 in the same
HTML page. So an error "document.form2 has no properties" is
given when accessing form 2 from within form 1.

Reproducible: Always
Steps to Reproduce:
1.Create a HTML page with two forms and some javascript in a button of form 1 to
access form 2
2.Click on the button in form 2
3.View the javascript error

Actual Results:  Javascript error

Expected Results:  No error, access to the other form is expected

This works properly with NS 4.61
For us, it's a showstopper.
I'm not sure if it's the Javascript engine or something else.
Attached file Reduced HTML testcase
Browser, not engine ---> DOM Level 0.

I can't confirm the bug with the testcase I've attached above.
It works the same in all three browsers I tried: NN4.7, IE6, 
and Mozilla trunk binary 2002051408 on WinNT.

The testcase simply accesses |document.form2.name| from 
within form1, and vice versa, with no problems -

Martin, could you modify this testcase and attach your version
via the "Create a New Attachment" link above? That way, we 
can see what the problem is; thanks -

It's not an OS/2-specific problem, is it? If not, you can change
the "OS" value above to "All".
Assignee: rogerl → jst
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → desale
I'm going to mark this all because if it fails, it is not OS/2 specific.

JST testcase works fine for me on OS/2.

Reporter, PLEASE post a testcase.
OS: OS/2 → All
Hardware: PC → All
From the reporter:

I've no idea to get this in the bugtracer so I send it to you. Maybe you could 
insert this.

In our office appl, I did get the error in two locations. Additional checks gave 
the
following details:
- Location 1: Turns out to be a timing issue: Huge page 460K. When waiting 
  long enough to get the page completely loaded, the error (reference to form 
500 
  of 500 forms) did not happen any longer.
- Location 2: More complicated. The forms are located in the <HEAD>
  section of the page, which contains itself a frameset. UGLY.
  The frameset entries contain an "onload" reference which failes to find
  the forms. NS461 works fine.
  See the attached file.
  Error occures at line 12. 
  Frameset starts at line 54, where also the "onload" reference is located.
  The {[xxxxx]} fields are filled by the office engine.

  The error nr 2 might be an out of HTML/Javascript spec. If so, the bugreport 
  could be canceled.
WFM Linux/2002051507
Please use the DOM inspector on the page in question?  Is the <form> in question
visible in the DOM?
Note: the DOM Inspector is found at Tools > Web Development in Mozilla.

Question: Comment #4 mentions, "See the attached file." Is this file
reduced enough to attach to this bug? That might help -

Attached file Offending page
Thanks Mike,

I ran the offending page through the Tools>Web Development.
I does not show both <FORM> elements in the <HEAD> section.
Ok.  So the parser is just dropping the invalid <form>s....  over to parser to
decide where we go from here.
Assignee: jst → harishd
Status: UNCONFIRMED → NEW
Component: DOM Level 0 → Parser
Ever confirmed: true
QA Contact: desale → moied
Priority: -- → P2
QA Contact: moied → dsirnapalli
I think that <FORM> elements in the <HEAD> are illegal.
Is this Evangelism issue?
Related bugs are bug 178258 and bug 185438.

Another example:
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=1677&action=view
In this case, frameset document has illegal form elements.
Summary: No javascript access to form → No javascript access to illegal form
Assignee: harishd → nobody
QA Contact: dsirnapalli → parser
WFM on trunk as of 2009-08-11.
Status: NEW → RESOLVED
Closed: 15 years ago
Component: HTML: Parser → DOM: Core & HTML
QA Contact: parser → general
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: