Forum Moderators: open

Message Too Old, No Replies

Need Help with Coding Syntax

         

peterinwa

8:24 pm on Nov 18, 2006 (gmt 0)

10+ Year Member



This is the complete text for a webpage that I have stripped down to the bare minimum to show my problem:

<html>
<head>
<script language="JavaScript">
</script>
<script src="common_help.js"></script>
<script language="JavaScript">
</script>
NIS Destroys Page
<p>
<script language="JavaScript">
c="More text that doesn't appear on the crashed page.";
c+=h3; // some more text from src=common_help.js
document.write(c);
if(window.SymError){alert("Error message for NIS Ad Blocking broken page goes here.")}
</script>

Below my name is a copy from View/Source of the above after the Norton Internet Security (NIS) Ad Blocking feature has finished with it. I am not trying to solve the problem with NIS; I simply want to issue an error message telling my users to turn off Ad Blocking if they want to use my page. I used to be able to do this with the following code:

if(window.SymError){alert("Error message for NIS Ad Blocking broken page goes here.")}

But it no longer works. Any ideas why?

Thanks, Peter (complete View/Source code below)

<html>
<head>

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

<script language="JavaScript">
</script>
<script src="common_help.js"></script>
<script language="JavaScript">
</script>
NIS Destroys Page
<p>
<script language="JavaScript">
c="More text that doesn't appear on the crashed page.";
c+=h3; // some more text from src=common_help.js
document.write(c);
if(window.SymError){alert("Error message for NIS Ad Blocking broken page goes here.")}
</script>
<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>

Fotiman

3:54 pm on Nov 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not familiar with NIS, but your syntax looks a little messed up:


NIS Destroys Page
<p>

That seems to still be in the <head> of the page. Also, you then try to do a document.write, also in the <head>.