We are calling a javascript from inside our ASPX page.As described below:
<script type="text/javascript">
var resultados = false;
function change_source(iframe)
{
iframe.src = 'someURL/index.jsp?querystringparametervalues';
return true;
}
window.onerror = function()
{
if (typeof window.resultados === "undefined")
{
resultados = false;
}
return true;
}
</script>
<iframe width="100%" height="330" frameborder="0"
scrolling="no" onload="change_source(this);" >
</iframe>
Error Description :
IFrame is calling some remote javascript where in a variable called 'resultados' is undefined.we are trying to ignore the error locally (local javascript).But still we are getting the same error "Object undefined".
How to suppress remote javascript so that it won't bre开发者_运维百科ak the execution?
Note : We are only concentrating on IE
Update :
We have tried something silly like
disabling
(i) ValidateRequest="false" (ii) EnableEventValidation="false" in Page directive.
Is there any work around from server side like "HttpRequest" / "HttpResponse" /"HttpHandler" / "HttpContext" object will catch these kind of exception and ignore it.
The problem is whenever we receive such error IDE opens up "Continue/Ignore/Break" MessageBox which is quite annoying.
I would be very greatful if someboday guide me to resolve it.
Thank you in advance!
精彩评论