[Javascript] window.onerror()

Peter Brunone peter at brunone.com
Tue Feb 11 18:02:01 CST 2003


Andrew,

	For some reason, the event handlers want you to use parentheses, i.e.

window.onerror=tellerror();

Regards,

Peter

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Andrew Gibson
|Sent: Tuesday, February 11, 2003 5:23 PM
|To: javascript at LaTech.edu
|Subject: [Javascript] window.onerror()
|
|
|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>
|
|
|_______________________________________________
|Javascript mailing list
|Javascript at LaTech.edu
|https://lists.LaTech.edu/mailman/listinfo/javascript
|



More information about the Javascript mailing list