2

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): alt text

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.

3
  • stop making them or correct them? what are the messages of those errors? Commented Feb 2, 2009 at 12:24
  • Write error-free code, it’s a win-win situation! Commented Feb 2, 2009 at 12:26
  • jQuery is a bad example of this. It has 25 try-catch-blocks. I'd say that it is a lazy programming practice. Commented Nov 7, 2015 at 21:06

5 Answers 5

5

If you want to turn them off in code, you can do this:

window.onerror = null;
Sign up to request clarification or add additional context in comments.

2 Comments

Mmm I've never seen that error before - I'm not 100% convinced it's coming from your javascript, unless you're doing something "interesting" - ActiveX or something...
@IonutPopa Thanks buddy you save my day ... had a minor error in a working code but could't be fixed ..
1

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.

1 Comment

The second link did the job :) Thanks :D +1 and accepted answer
1

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

1 Comment

It was a nice try :) I just tried that... with no luck... +1 for the effort.
1

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
}

1 Comment

Thanks, but i did said above: "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."
0

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

1 Comment

Yes, pretty sure.... I will add 2 images to the question, before and after the changes in configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.