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. Advertisements

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:
    579
    Fao, Sean
    Jul 6, 2003
  2. John Black
    Replies:
    8
    Views:
    4,512
    Xenos
    Aug 20, 2004
  3. drop
    Replies:
    0
    Views:
    512
  4. Replies:
    1
    Views:
    744
    Ivan Vecerina
    May 15, 2006
  5. Author
    Replies:
    1
    Views:
    592
    George
    Sep 24, 2008
  6. Marteno Rodia

    catch doesn't catch a thrown exception

    Marteno Rodia, Aug 3, 2009, in forum: Java
    Replies:
    5
    Views:
    818
    Daniel Pitts
    Aug 5, 2009
  7. hemant
    Replies:
    1
    Views:
    229
    Robert Klemme
    Sep 18, 2006
  8. find clausen

    window.opener.top.location.top.close ???

    find clausen, Oct 5, 2003, in forum: Javascript
    Replies:
    2
    Views:
    580
    find clausen
    Oct 5, 2003
Loading...