RE: XML DOM issues in IE and Opera
"Lon Boonen" <[email protected]>
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Since when is getElementById an XML DOM method? I never heard of it. But I may be wrong.
At the very least its very un-xml-like to do getElementById. There are no id's in XML. Sure you can make them, but they have no special meaning, so why would there be a method to get elemnts by them?
You should use selectSingleNode("//*[@id='" + myId + "']") for instance.
groetjes Lon
________________________________
From: [email protected] on behalf of Jim Auldridge
Sent: Sat 05/11/2005 13:37
To: [email protected]
Subject: [wdf-dom] XML DOM issues in IE and Opera
I am having a problem working with DOM methods in an XML document in
IE and Opera.
If you go here:
http://www.jaaulde.com/test_bed/XML-DOM/
and click the button at the top, my AJAX library get's and XML
document, and you should see the 5 boxes fill in with appropriate
data.
That data is, in order, the headers returned when the AJAX request
kicked off, the responseText, the data type of the responseXML (should
be object) and the data type of responseXML.getElementById('code1')
(should be object), and the actual value of the text within the
element with ID 'code1'. (the element with the id 'code1' is one of
the error elements in the XML)
The only place this is working correctly is Firefox. So if you want to
see the correct thing, use Fx.
In IE everything is right until the last 2 boxes which are empty and I
get an error saying that the reponseXML document doesn't support the
method getElementById(). In Opera I get the same basic error, but the
second to last box is correct--it says object. So the last box doesn't
work right.
So IE and Opera are not recognizing reponseXML as a XML document, or
at least not fully supporting the DOM. You can see in the headers that
the correct Content-Type (application/xml) is being sent. And I
manually set at the server to 'text/xml' to see if that was the issue,
but it is not.
Does anyone know what gives?? I have debugged my little heart out.
Unsubscribe
[email protected]
List info
http://www.quirksmode.org/dom/list.html
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/9rHolB/TM
--------------------------------------------------------------------~->
Unsubscribe
[email protected]
List info
http://www.quirksmode.org/dom/list.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wdf-dom/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/