[Javascript] window.onerror()

Andrew Gibson andyg at ihug.co.nz
Tue Feb 11 17:22:50 CST 2003


I'm trying to implement window.onerror on a i.e 6  page.

I grabbed this code from a tutorial page, but when I paste the code, it
simply suppresses the error and doesn't perform the function tellerror which
is what happens on their page as well at
 http://www.javascriptkit.com/javatutors/error2.shtml

Is this something to do with ie 6.0,. and if so, is there a workaround to
process client javascript errors?

Cheers
Andrew

<head>
<title>New Page 2</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<script>
function tellerror(){
alert('An error has occured!')
}
window.onerror=tellerror
</script>

<script>
document.write('hi there)  // deliberate error
</script>
</head>





More information about the Javascript mailing list