There is no way to prevent the Javascript dialog from appearing. Implementing the JavascriptError event merely gives you a way to receive the error and the user’s explanation when they hit Send.
It’s worth noting that if a Javascript Error does occur, the app on the server and the browser are no longer in sync any more and any further actions taken by the user would likely cause other errors.
Brock, if you’re getting JavaScript errors, start by making sure your Open events for WebPage, WebContainer, and controls are empty. You should move stuff that manipulates the UI to the first time Shown is called.