Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Can not catch the error thrown by the top window in IE???

Reply
Thread Tools

Can not catch the error thrown by the top window in IE???

 
 
virsir
Guest
Posts: n/a
 
      08-29-2007
Hi all,

To reproduce what I said, just run the codes below.
------------------------------------------------------
<script>
top.remote=function(){
throw new Error("top error");
//alert("remote ")
}
doTest=function(){
alert("begin")
try{top.remote();}
catch(e){alert(e.message)}
}
</script>

<input type='button' id='click' value='click me'
onClick='doTest()'></input>
---------------------------------------------------------------------------------------------------------
in Firefox it works well but not in IE.
Can someone help me on this issue?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
catch doesn't catch a thrown exception Marteno Rodia Java 5 08-05-2009 03:30 AM
Catch exception thrown by DropDownList set Declaratively drop ASP .Net 0 02-07-2007 08:31 PM
How to force client to catch exception thrown from failed constructor yancheng.cheok@gmail.com C++ 1 05-15-2006 06:21 AM
why catch (...) can not catch such exception John Black C++ 8 08-20-2004 02:34 PM
Proper Way to catch exception thrown by new keyword Fao, Sean C++ 5 07-06-2003 05:21 PM



Advertisments