<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">onerror</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">3</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Bubbles: No; Cancelable: Yes&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description"><p>Fires after one of a variety of errors occurs, depending on the
element or object to which the event handler is assigned. For
elements that load external content, such as the
<span class="literal">img</span> element, errors during loading (such as an
invalid URL) fire the <span class="literal">onerror</span> event on the
<span class="literal">img</span> element. When assigned to the
<span class="literal">window</span> object (including direct assignment in the
<span class="literal">&lt;body&gt;</span> tag), overall runtime script errors
(not compile-time syntax errors) also fire the
<span class="literal">onerror</span> event. A technique that some scripters
used in earlier browsers that plastered script error messages inside
intrusive alert dialog boxes was to trap all runtime errors in the
following manner:
</p>
<span class="PROGRAMLISTING"><pre>function doNothing( ) {return true;}
window.onerror = doNothing;</pre></span>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			This isn't good for debugging because you need to
find errors during development. See the <span class="literal">Error</span>
object in Chapter 9 for more details on
processing errors from this event handler. Eventually, there will
enough browsers deployed that use more modern exception handling.
</p>
							</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="typicaltargets"><span class="title">Typical Targets</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Elements that load external content, plus the
<span class="literal">window</span> object.
</p>
					</td>
				</tr>
			</table>
		</div>
</body>
</html>