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

Discussion in 'Javascript' started by virsir, Aug 29, 2007.

  1. virsir

    virsir Guest

    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?
     
    virsir, Aug 29, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fao, Sean
    Replies:
    5
    Views:
    407
    Fao, Sean
    Jul 6, 2003
  2. John Black
    Replies:
    8
    Views:
    4,163
    Xenos
    Aug 20, 2004
  3. drop
    Replies:
    0
    Views:
    399
  4. Replies:
    1
    Views:
    626
    Ivan Vecerina
    May 15, 2006
  5. Marteno Rodia

    catch doesn't catch a thrown exception

    Marteno Rodia, Aug 3, 2009, in forum: Java
    Replies:
    5
    Views:
    572
    Daniel Pitts
    Aug 5, 2009
Loading...

Share This Page