Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

onbeforeunload "Unspecified Error" in IE6

843844Sep 17 2008 — edited Sep 17 2008
Hi,

I am writing an application for IE 6 using RichFaces (I hope this evokes SOME sympathy from all - hehe) and I am using an onbeforeunload event to trap form changes and ask the user if they really want to navigate to another page. I have the code working (albeit with some hacks, it was asking twice at first), but when the user hits cancel I get an "Unspecified Error" Javascript error. After some research, I found that this occurs when eval() is called in Javascript (and ONLY in IE6), and the solution is to surround the eval() function with a try/catch block (in Javascript). Now, I don't have access to the function call since it is part of Richfaces (or maybe just JSF in general, I am not sure).

Has anyone run into this issue and if so, knows of a way around it. It's not a complete show stopper as show every javascript error is not enabled by default, but I'd like to not have that ugly yellow triangle come up every time a user cancels a page.

Any help/advice is greatly appreciated.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2008
Added on Sep 17 2008
5 comments
115 views