Welcome to WebmasterWorld Guest from 54.221.49.52

Forum Moderators: open

Message Too Old, No Replies

two javascript blocks in every document

what do they mean?

     

sebbothebutcher

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

10+ Year Member



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

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

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



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

sebbothebutcher

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

10+ Year Member



okay! thanks for your help

Rambo Tribble

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

WebmasterWorld Senior Member 10+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month