Closed Bug 297250 Opened 20 years ago Closed 20 years ago

getElementById returns null for XMLHttpRequest loaded elements outside of the html namespace

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: will, Unassigned)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5

When a document is loaded using a XMLHttpRequest and the namespace on the
element is something other than the XHTML namespace, the function
request.responseXML.getElementById(id) returns null.

Reproducible: Always

Steps to Reproduce:
1. Load the test page
2. Hit the "Go" button
3. Note that the return for "testscripttwo" is null



Expected Results:  
getElementById should return the element with the given id regardless of whether
it is in the HTML namespace or not.
Goes through a couple different files and for each it requests the file via
XMLHttpRequest, gets an id from an element by going through the document tree
then attempts to request that same element using the id in getElementById. For
elements in the xhtml namespace it works, for others it returns null.
Original posting lacked a base href and so the stylesheets didn't load making
it unreadable.
Attachment #185833 - Attachment is obsolete: true
You need to declare an attribute of type ID in a DTD.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: