Welcome to WebmasterWorld Guest from 107.21.163.40

Forum Moderators: open

Message Too Old, No Replies

two javascript blocks in every document

what do they mean?

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

Junior Member

10+ Year Member

joined:Apr 12, 2004
posts:112
votes: 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

4:01 pm on June 14, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Those are created by Norton System Works on your computer (when the page is opened)... to prevent malicious scripts.
8:21 pm on June 14, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 12, 2004
posts:112
votes: 0


okay! thanks for your help
10:36 pm on June 14, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2004
posts:1181
votes: 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.