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 5 of 5
  1. #1
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 unexplained Javascripts appearing on remote pages

    Can anyone tell me how/why these Javascripts are appearing in my source code, and what their function is please? I haven't scripted them and they are not on my actual html document, but they are there when you click "View source" online. Is this auto-generated code by Dreamweaver, or my webhost, or has someone hacked into my webhost? Do I need to be worried? How do I remove them if necessary?

    Thank you!

    The first one appears in the head section:
    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>
    and this second one appears after the html closing tag:
    Code:
    <script language="JavaScript">
    <!--
    var SymRealOnLoad;
    var SymRealOnUnload;
    
    function SymOnUnload()
    {
      window.open = SymWinOpen;
      if(SymRealOnUnload != null)
         SymRealOnUnload();
    }
    
    function SymOnLoad()
    {
      if(SymRealOnLoad != null)
         SymRealOnLoad();
      window.open = SymRealWinOpen;
      SymRealOnUnload = window.onunload;
      window.onunload = SymOnUnload;
    }
    
    SymRealOnLoad = window.onload;
    window.onload = SymOnLoad;
    
    //-->
    </script>

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    That's Norton's auto-code insertion.

    http://www.webdevtips.com/webdevtips/js/nis.shtml

  • #3
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much for the info and the link - fascinating reading, but I do have to agree with the author of the article!

    I certainly didn't know code could be added locally to my webpages!

    Thanks again!

  • #4
    Regular Coder
    Join Date
    Feb 2005
    Posts
    400
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's fairly common for end-users to have extra code inserted into pages they are viewing. Any number of cookie/popup blocking programs do it, Firefox's Greasemonkey extention alllows inserting arbitrary javascript code into pages, and my favorite, The Proxomitron, allow arbitrary javascript/html insertion and on the fly rewriting of pages.

    Make your pages robust enough to survive the little assaults, and user-friendly enough to discourage the major assaults.
    Last edited by Harry Armadillo; 04-15-2005 at 04:25 PM. Reason: grammar and spelling

  • #5
    New Coder
    Join Date
    May 2003
    Location
    South Wales, UK
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't use pop-ups or any sort of ads on any of my sites, so hopefully the "end user" shouldn't have any problems.


  •  

    Posting Permissions

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