March 13, 200917 yr How would I prevent JavaScript from displaying errors? My script runs fine on all browsers except for IE6 it alerts the user of a problem on line such and such of script this and that. So how do I turn off errors? Or is this possible?
March 13, 200917 yr OK im going to try and shed some light as im still learning myself, But i think there is a javascript code for trapping errors and controlling what they do. http://www.w3schools.com/js/js_onerror.asp The link above will help shed better light than i can but it should help to maybe trap the error into sets so you can hide the display for simple errors that dont effect the user or have them flagged up if there going to interfere with the users forms/exsperiance. Hope that helps
March 13, 200917 yr Author OK im going to try and shed some light as im still learning myself, But i think there is a javascript code for trapping errors and controlling what they do. http://www.w3schools.com/js/js_onerror.asp The link above will help shed better light than i can but it should help to maybe trap the error into sets so you can hide the display for simple errors that dont effect the user or have them flagged up if there going to interfere with the users forms/exsperiance. Hope that helps Thanks I'll check it out.
March 13, 200917 yr Author Pleased i could help if it does :-).. Not used ie6 alot ..... Yes. I wish I didn't have to support IE6, but sadly this site must support all browsers.
March 13, 200917 yr In this case some thing i learn the other day was that you have to use behaviors to show png files in IE6 just making sure you know this as this caught me out once when i viewed a site on IE6
March 13, 200917 yr Author Well, I tried the function and couldn't get it working but I did find this handy little script so all you have to do to disable errors is put this in the <head> of your document: <script type="text/javascript"> function noError(){return true;} window.onerror = noError; </script>
Create an account or sign in to comment