Client Side errors

J

Jeremy Smith

I would like to collect IE client side javascript errors to a database
and redirect the user to a different page on any error.

Links or sample code would be very helpful. Thanks.
 
K

Klaus Johannes Rusch

Jeremy said:
I would like to collect IE client side javascript errors to a database
and redirect the user to a different page on any error.

Links or sample code would be very helpful. Thanks.

<script type="text/javascript">
window.onerror = function () { window.location.href =
'/error.html?referrer=' + escape(window.location.href); }
</script>

This will load your error page with a query string telling you what page
was failing originally.

You can extract that information from the server log or dynamically add
this to a database from the error page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top