Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / November 2006



Tip: Looking for answers? Try searching our database.

document object and DOM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
User1014 - 30 Nov 2006 10:14 GMT
I thought that the DOM was XmlHttpRequest (in mozilla based clients) and
XMLHTTP in IE land.

So why do I see the window.document object (the document property of the
javascript client-side global object) referred to as the DOM object.

I'm confused now as to which one is which.
Julian Turner - 30 Nov 2006 11:45 GMT
> I thought that the DOM was XmlHttpRequest (in mozilla based clients) and
> XMLHTTP in IE land.
[quoted text clipped - 3 lines]
>
> I'm confused now as to which one is which.

Hi

DOM (Document Object Model) generally refers to the whole range of
objects which browsers make available to script to manipulate HTML and
XML documents.  Take a look at <URL:http://www.w3.org/DOM/> for the
standards.

A DOM object I would interpret as being any one of the objects forming
part of that range.  Thus an HTML "P" element is a DOM object that
implements the HTMLParagraphElement interface.

Equally some may use DOM object to refer just to the object which is
the root of the XML or HTML document, i.e. which implements Document
(if XML) and HTMLDocument as well (if HTML) interfaces.

In which case this may be "window.document", or the XML document
returned by the responseXML property of the XmlHttpRequest object.

Regards

Julian
Martin Honnen - 30 Nov 2006 13:30 GMT
> I thought that the DOM was XmlHttpRequest (in mozilla based clients) and
> XMLHTTP in IE land.
[quoted text clipped - 3 lines]
>
> I'm confused now as to which one is which.

responseXML on a XMLHttpRequest/XMLHTTP object gives you an XML DOM
document.
window.document gives you an HTML DOM document in IE and in Mozilla and
Opera it will depend on the type of document sent, it can be a HTML DOM
document, an XML DOM document, an SVG DOM document (or a XUL document).

Signature

    Martin Honnen
    http://JavaScript.FAQTs.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.