javascript :Object doesn't support this property or method
- by Kaushik
In my jsp page, I have in the tag, the following code:
<script type="text/javascript"
src="<%=request.getContextPath()%>/static/js/common/common.js"></script>
<script type="text/javascript">
// Function for Suppressing the JS Error
function silentErrorHandler() {return true;}
window.onerror=silentErrorHandler;
</script>
If there is some javascript executing on the jsp page after this, then I guess silentErrorHandler() will have no effect. i.e. the error will still show on page. IS this correct? Because the error is showing and am not sure why.
The second part of the question is this:
The error is
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; AskTbFXTV5/5.9.1.14019)
Timestamp: Fri, 7 Jan 2011 21:26:23 UTC
Message: Object doesn't support this property or method
Line: 613
Char: 1
Code: 0
URI: http://localhost:9080/Claris/static/js/common/common.js
And finally, line 613 states
document.captureEvents(Event.MOUSEUP);
There is error on IE8. Runs fine on Mozilla and IE7.
Any suggestions will be very helpful