Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member jf1288's Avatar
    Join Date
    Sep 2003
    Posts
    215
    Member #
    3300
    How is it i go about telling the browser to run function "xxx()" when an error occurs?

    is it :
    Code:
    window.onError = "xxx()";
    or what?


    Thanks,
    Jordan
    If its not in Family Guy its not worth it.

  2.  

  3. #2
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    IIRC you put that in a <script></script> tag in the head of your document, and define a function that handles your error.

    EX:
    Code:
    <html>
    <head>
    <script type="text/javascript">
    function xxx() {
     alert("An error has occured!!");
     // handle your error here
    }
    
    window.onError = "xxx()";
    </script>
    </head>
    <body>
    <!-- your html goes here -->
    </body>
    </html>
    - Brian

  4. #3
    Senior Member jf1288's Avatar
    Join Date
    Sep 2003
    Posts
    215
    Member #
    3300
    Thanks man, ur a god. a god with an awsome looking site. Howd you hide the script like that?
    If its not in Family Guy its not worth it.

  5. #4
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    Thanks, but I didn't really "hide" the script, I just disabled right-clicking on a few pages, and embedded the main content within numerous frames and iframes, and on the index page I just kinda hit enter a lot of times to move the text down
    - Brian

  6. #5
    Senior Member jf1288's Avatar
    Join Date
    Sep 2003
    Posts
    215
    Member #
    3300
    o wow man. Genious.

    I think im gonna start using that trick on my pages.
    If its not in Family Guy its not worth it.

  7. #6
    Guest
    same


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com