# Tahir Hassan's Blog

My Technical Notes

## Monday, 29 July 2013

This Javascript error occurs when using Ajax Toolkit. Apparently, it occurs when you have an UpdatePanel which contains the Target and Close Buttons.

I tried quite a few work arounds but eventually I did a simple hack to remove the error, which is to use window.onerror method.

Copy and paste the following code. Note that it is bad practice to use this sort of code as it could potentially hide other errors.


window.onerror = function (msg, url, num) {
if (msg) {