By default, browsers hide JavaScript error messages.
Please enable web console. Error messages will be displayed there.
How to enable:
In firefox menu, "Tools"-->"Web Developer"-->"Web Console"
Click the button "works". JavaScript
<script>alert('Button [Works] clicked');</script>
will be executed.
Click the button "Error". JavaScript
<script>myFunc(); alert('Button [Error] clicked');</script>
should be executed. But the popup doesn't appear.