Flanagan onerror example does not work for me

A

Alliss

I am working my way through David Flanagan's Definitive Guide to Javascript.
Example 14-1 has an onerror event handler and includes a deliberate error as
a test. Problem is my browser's javascript default error handler intervenes
and controls the error handling and the handler in the example is not
called.
Disabling the browser's script debugging does not help - presumably it
prevents the error being passed to the handler?
I would be grateful if someone could explain what is going on here and how I
can get this example to run.
My browser is IE 6.0.2800.1106
 
J

Jim Ley

I am working my way through David Flanagan's Definitive Guide to Javascript.
Example 14-1 has an onerror event handler and includes a deliberate error as
a test. Problem is my browser's javascript default error handler intervenes
and controls the error handling and the handler in the example is not
called.

Which edition, the 4th is good, but does still contain old examples
from the not so good previous books. onerror is generally best
avoided as it doesn't catch many errors anyway!
I would be grateful if someone could explain what is going on here and how I
can get this example to run.
My browser is IE 6.0.2800.1106

it may be rewrite your browser!

Look for object detection techniques, but give them more weight than
Flanagan does there.

Jim.
 
A

Alliss

Jim Ley said:
Javascript.

Which edition, the 4th is good, but does still contain old examples
from the not so good previous books. onerror is generally best
avoided as it doesn't catch many errors anyway!

Thanks Jim. It is the 4th edition. The example used an error handler to
demonstrate dynamically generated html rather than error handling as such,
so I will press on and not let it sidetrack me.

Allis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top