homepage Welcome to WebmasterWorld Guest from 54.243.17.133
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
two javascript blocks in every document
what do they mean?
sebbothebutcher




msg:1474331
 3:46 pm on Jun 14, 2004 (gmt 0)

hi! i've noticed that EVERY html document i found on the internet has those two script blocks in it... what do they mean and what they are here for.

1. script block:

<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. script block:

<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>

-thanks in advance

 

DrDoc




msg:1474332
 4:01 pm on Jun 14, 2004 (gmt 0)

Those are created by Norton System Works on your computer (when the page is opened)... to prevent malicious scripts.

sebbothebutcher




msg:1474333
 8:21 pm on Jun 14, 2004 (gmt 0)

okay! thanks for your help

Rambo Tribble




msg:1474334
 10:36 pm on Jun 14, 2004 (gmt 0)

Actually, the code is to prevent pop-up windows and can be disabled in the Internet Security menu. You may notice that the code reassigns the window.open command to a generic object. Obviously, the code is unnecessary if you are running a browser like Mozilla, Firefox or Opera. The code sometimes breaks legitimate pages, for instance some AP-wire pages.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved