Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: WHAT is this?

  1. #1
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts

    WHAT is this?

    I see this so often in source codes, what is it?
    Code:
    <script language="JavaScript">
    <!--
    
    function SymError()
    {
      return true;
    }
    
    window.onerror = SymError;
    
    var SymRealWinOpen = window.open;
    
    function SymWinOpen(url, name, attributes)
    {
      return (new Object());
    }
    
    window.open = SymWinOpen;
    
    //-->
    </script>

  • #2
    Regular Coder
    Join Date
    Oct 2006
    Posts
    107
    Thanks
    3
    Thanked 5 Times in 5 Posts
    That's Norton blocking advertisments or, trying to.

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    its an error handling script.

    basically if there is an error caused by any of the scripts on that page it'll trigger the specified script. in this case it returns true, which essentially makes it seem as though an error didnt occur. what ever script caused the error will not complete, but the user wshould not be prompted that there was an error, would you like to continue to run scripts on this page? instead it tells the browser to ignroe the error. this is a great tool if you collect the error information so that you can fix it later. but most people dont do that.
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,590
    Thanks
    0
    Thanked 644 Times in 634 Posts
    It is either added by your firewall if you are running Norton or if it is in the web page itself then the person who owns the site is running that firewall and forgot to delete that code from their page before uploading it.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •