<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">Document</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">n/a</span>  DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>The <span class="literal">document</span> object described earlier is, in the
W3C DOM structure, more specifically an
<span class="literal">HTMLDocument</span> node, a member of the HTML module of
the standard. The <span class="literal">HTMLDocument</span> node inherits the
properties and methods of the <span class="literal">Document</span> node (with
an uppercase "D" described here,
and defined in the W3C DOM Core module. This is the pure, abstract
<span class="literal">Document</span> node, and all that is needed to contain
an unrendered XML document.
</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			Netscape 6 extends this node with a <span class="literal">load( )</span> method
that allows scripts to load XML documents into a plain (and unseen)
<span class="literal">Document</span> node. Such a node is created via the
<span class="literal">document.implementation.createDocument( )</span> method.
Scripts can then access the XML data in that document through regular
W3C DOM document tree properties and methods.
</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			To help reinforce in your mind the heritage of the
<span class="literal">document</span> object you normally script (that is, the
instance of the <span class="literal">HTMLDocument</span> node represented in
each window's document), I show the lists of
properties and methods for the core <span class="literal">Document</span>
object. For descriptions of all these properties and
methodsexcept for the uninherited Netscape 6-specific
<span class="literal">load( )</span> methodsee the
<span class="literal">document</span> object, earlier in this chapter.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">Object Model Reference</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre><span class="replaceable">documentNodeReference</span></pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificproperties"><span class="title">Object-Specific Properties</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">doctype</span></td><td><span class="literal">documentElement</span></td><td><span class="literal">implementation</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificmethods"><span class="title">Object-Specific Methods</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">createAttribute( )</span></td><td><span class="literal">createAttributeNS( )</span></td><td><span class="literal">createCDATASection( )</span></td>
								</tr>
								<tr><td><span class="literal">createComment( )</span></td><td><span class="literal">createDocumentFragment( )</span></td><td><span class="literal">createElement( )</span></td>
								</tr>
								<tr><td><span class="literal">createElementNS( )</span></td><td><span class="literal">createEntityReference( )</span></td><td><span class="literal">createProcessingInstruction( )</span></td>
								</tr>
								<tr><td><span class="literal">createTextNode( )</span></td><td><span class="literal">getElementById( )</span></td><td><span class="literal">getElementsByTagName( )</span></td>
								</tr>
								<tr><td><span class="literal">getElementsByTagNameNS( )</span></td><td><span class="literal">importNode( )</span></td><td><span class="literal">load( )</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificeventhandlerproperties"><span class="title">Object-Specific Event Handler Properties</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
			</table>
		</div><div id="load( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">load( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">n/a</span>  DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">load("<span class="replaceable">URI</span>")</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Loads an XML file into the current <span class="literal">Document</span>
object. Attempting to load other types of files (such as HTML) throws
an exception. The server must be configured to send the file as the
<span class="literal">text/html</span> content type.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>A string of the URI to an external XML file.</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div>
		<div id="readyState">
					<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
						<tr><td valign="top" class="name">readyState</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" nowrap class="usage"><p class="literal"></p>
							</td><td valign="top" nowrap class="requirements"><span class="emphasis">Read-only</span>&nbsp;&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="description"><p>			Returns the current download status of the object's
		content. If a script (especially one initiated by a user event) can
		perform some actions while the document is still loading, but must
		avoid other actions until the entire page has loaded, this property
		provides intermediate information about the loading process. You
		should use its value in condition tests. The value of this property
		changes during loading as the loading state changes. Each change of
		the property value fires an <span class="literal">onReadyStateChange</span>
		event (the event does not bubble).
		</p>
									</td>
								</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
								<tr>
									<td colspan="2"><p>			When introduced with IE 4, the property was available for only the
		<span class="literal">document</span>, <span class="literal">embed</span>,
		<span class="literal">img</span>, <span class="literal">link</span>,
		<span class="literal">object</span>, <span class="literal">script</span>, and
		<span class="literal">style</span> objects. IE 5 expanded coverage to all HTML
		element objects.
		</p>
									</td>
	</tr>

						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td><span class="programlisting"><pre>if (document.readyState == "loading") {
		    //statements for alternate handling while loading
		}</pre>
								</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
						</tr>
						<tr>
							<td colspan="2"><p>			For all but the <span class="literal">object</span> element, one of the
		following values (as strings): <span class="literal">uninitialized</span> |
		<span class="literal">loading</span> | <span class="literal">loaded</span> |
		<span class="literal">interactive</span> | <span class="literal">complete</span>. Some
		elements may allow the user to interact with partial content, in
		which case the property may return <span class="literal">interactive</span>
		until all loading has completed. Not all element types return all
		values in sequence during the loading process. The
		<span class="literal">object</span> element returns numeric values for these
		five states. They range from <span class="literal">0</span>
		(<span class="literal">uninitialized</span>) to <span class="literal">4</span>
		(<span class="literal">complete</span>).
		</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
						</tr>
						<tr>
							<td colspan="2"><p>			None.</p>
							</td>
						</tr>
					</table>
				</div>

<div id="title">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">title</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements"><span class="emphasis">Read/Write</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Provides an advisory description of the element. When the element is
one that has a physical presence on the page, the browser renders the
value of this property as a floating text label when the cursor rests
atop the element for a moment. The size, font characteristics, and
color of this label are not within control of scripting.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>document.getElementById("<span class="replaceable">elementID</span>").title = "Hot stuff!";</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			String.</p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap colspan="2" class="default"><span class="title">Default</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Empty string. </p>
					</td>
				</tr>
			</table>
		</div>
</body>
</html>