/    Sign up×
Community /Pin to ProfileBookmark

supress error messages

Hi,
any body knows how to suppress any error messages to pop up. The page looks like working fine….but some times error messages pop up, I don’t want them to pop up,
Any suggestion would be highly appreciated

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@JonaMay 27.2003 — [font=courier new]

window.onerror = new Function("return true");

[/font]
Copy linkTweet thisAlerts:
@HoomanauthorMay 27.2003 — I had the following line in my page, didn't help

function errorHandler() {

return true;

}

window.onerror = errorHandler;


I had it in the JAVASCRIPT TAG.

Should I leave it there?

I still have pop up error messages??
Copy linkTweet thisAlerts:
@AdamBrillMay 27.2003 — Put this in the head of your page:<script language="JavaScript" type="text/javascript">
function errorHandler() {
return true;
}
window.onerror = errorHandler;
</script>

You won't get any errors from then on. However, you are best off to get rid of all the errors in your code, rather than to just suppress them... ?
Copy linkTweet thisAlerts:
@NevermoreMay 27.2003 — How about a link to your code - that way we can debug it, rather than just stopping it telling you to?
Copy linkTweet thisAlerts:
@HoomanauthorMay 27.2003 — Thanks for the king offer,

The page is actually running in a local network...

The error is not following a consistant pattern, I haven't been able to see why it happens,

It sometimes happens, and some times doesn't.

I have a REMOVE button, from a list box, when you select one of the options in the list, and click remove, it calls the remove function, and that option gets removed.

It works properly for days, and once upon a time, gives me an error.

All I found so far is when I change focus to other applications, and then click on my page, it is more probable to happen.

Thanks,
Copy linkTweet thisAlerts:
@NevermoreMay 27.2003 — You could post the code...
×

Success!

Help @Hooman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...