Sergio
Sergio

Reputation: 8259

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

Upvotes: 2

Views: 15965

Answers (5)

slashnick
slashnick

Reputation: 26539

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.

Upvotes: 1

slashnick
slashnick

Reputation: 26539

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
}

Upvotes: 1

geowa4
geowa4

Reputation: 41803

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

Upvotes: 1

Greg
Greg

Reputation: 321578

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

window.onerror = null;

Upvotes: 5

AnthonyWJones
AnthonyWJones

Reputation: 189437

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

Upvotes: 0

Related Questions