<html> <head> <script type="text/javascript"> onerror=handleErr; var txt=""; function handleErr(msg,url,l) { txt="There was an error on this page.\n\n"; txt+="Error: " + msg + "\n"; txt+="URL: " + url + "\n"; txt+="Line: " + l + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); return false; } function message() { adddlert("Welcome guest!"); } </script> </head> <body> <input type="button" value="View message" onclick="message()" /> </body> This code returns "object expected" in IE and "adddlert not defined" in Mozilla Firefox Question: I want the data "adddlert not defined" to be displayed in IE too. How can i get that information in IE ?
"maanand" wrote in message news:E3F06BEB-8CD1-4E3E-8F58-07F70F39D928@microsoft.com... > <html> > <head> > <script type="text/javascript"> > > onerror=handleErr; > var txt=""; > > function handleErr(msg,url,l) > { > txt="There was an error on this page.\n\n"; > txt+="Error: " + msg + "\n"; > txt+="URL: " + url + "\n"; > txt+="Line: " + l + "\n\n"; > txt+="Click OK to continue.\n\n"; > alert(txt); > return false; > } > function message() > { > adddlert("Welcome guest!"); > } > </script> > </head> > > <body> > <input type="button" value="View message" onclick="message()" /> > </body> > > > This code returns > "object expected" in IE and > "adddlert not defined" in Mozilla Firefox > > Question: > > I want the data "adddlert not defined" to be displayed in IE too. How can i > get that information in IE ? > You can't. -- Anthony Jones - MVP ASP/ASP.NET
Hi, Is it possible to capture the object in IE in some other way?without using onError. Is it possible to implement in IE the code in mozilla ? My intention is to fix one javaError that happens very rarely . So im not able to recreate it . that particular error is affecting my website very badly. I can fix the same if i find where the error causing abject is. Any inputs on these things or any ideas to log java errors will be very useful thanks Anand "maanand" wrote: > <html> > <head> > <script type="text/javascript"> > > onerror=handleErr; > var txt=""; > > function handleErr(msg,url,l) > { > txt="There was an error on this page.\n\n"; > txt+="Error: " + msg + "\n"; > txt+="URL: " + url + "\n"; > txt+="Line: " + l + "\n\n"; > txt+="Click OK to continue.\n\n"; > alert(txt); > return false; > } > function message() > { > adddlert("Welcome guest!"); > } > </script> > </head> > > <body> > <input type="button" value="View message" onclick="message()" /> > </body> > > > This code returns > "object expected" in IE and > "adddlert not defined" in Mozilla Firefox > > Question: > > I want the data "adddlert not defined" to be displayed in IE too. How can i > get that information in IE ? >