Client Side errors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy Smith

    #1

    Client Side errors

    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.

  • Klaus Johannes Rusch

    #2
    Re: Client Side errors

    Jeremy Smith wrote:
    [color=blue]
    > 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.[/color]

    <script type="text/javascript">
    window.onerror = function () { window.location .href =
    '/error.html?refe rrer=' + escape(window.l ocation.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.

    --
    Klaus Johannes Rusch
    KlausRusch@atme dia.net

    Comment

    Working...