简体   繁体   中英

How to disable JavaScript error messages?

I know this seams a trivial question, but how can I disable the annoying JavaScript error messages?

I am inserting data into an unfinished web application and I keep getting about 30 errors for every form I submit. It's driving me crazy.

I'm using IE7.

Please note that I already tried "Internet options - Advanced - Browsing", disabled script debugging for IE and other and unchecked the "display a notification for every script error". All I got was a different error message, but I still have to close a LOT of alert messages.

I think I am going insane.

EDIT: Before and after Image(url omitted to protect the innocents): 替代文字

I don't have access to the code, I am just inserting data, the application is still being built and the JavaScript is generated from codebehind. There is absolutely nothing I can do to remove this errors.

如果要在代码中关闭它们,可以执行以下操作:

window.onerror = null;

It seems like you don't have "enough storage". Maybe you can try upping your cache size. That's just a shot in the dark, but worth a try...

If you don't want to hide all other errors wrap the call to the code in a try/catch.

try {
    callDodgyCode();
}
catch(e) {
    // Eat error
}

After some Googling it seems you might get this if your user-agent string is too long. See here and here . I'm not convinced this will fix it but it might be worth a try.

Sounds like you got the correct settings. Are you sure these aren't alerts actually in the code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM