Page 1 of 1

How to ignore IE Script Error with revBrowser?

Posted: Fri Aug 19, 2011 5:54 am
by alex298
Hello,

Many websites are using JavaScript with a lot of errors. With modern Firefox browser, it will bypass, ignore or accept the errors. However the revBrowser will always pop up a lot of "Internet Explorer Script Error" windows. The pop-up really interrupt the process.

Any way to ignore the error so that the "Internet Explorer Script Error" windows will not be pop up?

Thanks and best regards

Re: How to ignore IE Script Error with revBrowser?

Posted: Fri Aug 19, 2011 3:22 pm
by AndyP
Hi Alex,

Try using this:


<head>
<script type="text/javascript">

function noError(){return true;}
window.onerror = noError;

</script>
</head>

This creates a function that always returns true, and then whenever an error occurs, calls this function (returning true and suppressing the error).

It's not good practice but should help you out.

LiveCode uses MSHTML (IE) on Windows and WebKit on Mac OS X .

Re: How to ignore IE Script Error with revBrowser?

Posted: Fri Aug 19, 2011 4:09 pm
by AndyP
Hi Alex,

Whoops. just realised you meant sites you have no control over.

More of a problem. You might try passing a web page to an I-frame in the browser. You should be able to trap errors that way.

I'll do a few experiments and get back to you.

Re: How to ignore IE Script Error with revBrowser?

Posted: Fri Aug 19, 2011 8:00 pm
by mwieder
Does changing the IE preferences help?

Re: How to ignore IE Script Error with revBrowser?

Posted: Sat Aug 20, 2011 10:15 am
by alex298
Hi mwieder,

Thanks for your help. Actually the browser always set to "no notification for script error".

Thanks and best regards

Alex