<input type=”button” value=”Click Me” onclick=”handleClick()” />
When this page loads, the
function is called and an exception occurs when trying to call
a non-existent method of the window object. That thread is then exited so the
never executed. When the user clicks on the button, however, the
function is still called
and an alert displays the text
tracking down errors while interpreting), each reports errors in different ways: Some pop up an error
aware of where this data is located on your target browsers. Browsers such as Internet Explorer, Mozilla,
Safari, and Opera each have their own unique ways of presenting this data. This section guides you to
the error message information for each of them.
Internet Explorer (Windows)
Microsoft’s flagship browser, Internet Explorer for Windows, is capable of reporting errors in a couple of
different ways. By default, Internet Explorer pops up a dialog with the error details (Figure 14-1) and
asks if you want to continue running scripts on the page. This is misleading, because clicking either Yes
or No allows other scripts to continue running.
If the browser has a debugger (such as Microsoft Script Debugger, which is discussed later in this chap-
ter), the dialog offers the option to debug the script or ignore it (Figure 14-2). Clicking Yes on this dialog
brings you into the debugger; clicking No simply closes the dialog.
17_579088 ch14.qxd 3/28/05 11:41 AM Page 413