Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    10
    Thanked 0 Times in 0 Posts

    who could I stop Error message at IE browser

    who could I stop Error message at IE browser ?

    those message break done page loading and they are not major error.

    how could I stop them so the visitor don't have any error alert if he use debugging feature in IE browser ?

    I beliefe there is an Javascript command block that error message.
    Last edited by Dooq; 10-18-2008 at 03:18 AM.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Easy, fix the errors....

    The average user will not have the debugging feature on so it is not a big deal unless you are trying to hide bugs from you testers or boss.

    Look into window.onerror if you really want to put a band-aid on something that needs stitches.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,373
    Thanks
    11
    Thanked 592 Times in 572 Posts
    window.onerror =function(){ return false; }
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • Users who have thanked rnd me for this post:

    Dooq (10-18-2008)

  • #4
    Regular Coder
    Join Date
    Mar 2006
    Posts
    728
    Thanks
    35
    Thanked 132 Times in 123 Posts
    don't you need to return true from an error to keep it from reaching the window?

    window.onerrror=function(e){
    errorlog= errorlog || [];
    errorlog.push(e.message);
    return true;
    }

  • Users who have thanked mrhoo for this post:

    Dooq (10-18-2008)

  • #5
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    http://www.w3schools.com/js/js_onerror.asp

    The value returned by onerror determines whether the browser displays a standard error message. If you return false, the browser displays the standard error message in the JavaScript console. If you return true, the browser does not display the standard error message.

  • The Following 2 Users Say Thank You to Philip M For This Useful Post:

    Dooq (10-18-2008), mrhoo (10-18-2008)

  • #6
    New Coder
    Join Date
    May 2006
    Posts
    29
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Thanks guys for the helpful reply


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •