PDA

View Full Version : JavaScript & Norton



ettubrute
30-05-2006, 02:05 PM
How do I bypass this rubbish that Norton Internet Security puts into web pages? Because it buggers up all subsequent use of JavaScript!


<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

//-->
</script>

lord_spaceman
30-05-2006, 03:09 PM
Uninstall Nortons. Use something real. I was once a Norton's man for many years, never going back.

ettubrute
30-05-2006, 04:38 PM
Problem is, the client insists on having Norton! So I need a workaround...

pookfuzz
30-05-2006, 05:05 PM
Why exactly would this piece of JavaScript be a problem - all it does is suppress errors.

If it really bothers you that much just change the handler again, this time to one that returns false - basically telling the browser the event was NOT handled by the event function and should be bubbled up to the parent handler.

The code should be positioned so it appears just after the junk Norton puts in.


<script language="JavaScript">
<!--
window.onerror = function() { return false; }
//-->
</script>

ettubrute
30-05-2006, 05:23 PM
Well, I don't know why it's a problem! But the site doesn't work anymore when it gets inserted! :( The window.onload() doesn't seem to fire anymore! Has me bafled!

pookfuzz
30-05-2006, 05:55 PM
Perhaps norton is remapping more than just the onerror event.

cybershark
30-05-2006, 06:35 PM
AFAIK NIS scans all javascript in web pages. So hopefully there's an option to disable scanning JavaScript in web pages.

And as pookfuzz said it can't just be that JavaScript causing the problem, there must be some other code.

Have you tried disabling ad blocking?

ettubrute
30-05-2006, 07:35 PM
Yes... tried that! Funny thing is, if I disable Norton, the pages load without problems! So there must be something in that stupid handler breaking my code! But how to find out?

pookfuzz
30-05-2006, 08:28 PM
But how to find out?

View source on the broken page I would guess. It is not as if Norton will be able to magically hide what it is doing from you. Keep in mind that .js files will also be subjected to the same mangling the html files get.

ettubrute
30-05-2006, 08:33 PM
Hmmm. Thanks. Checked the html files... will have to check the js files as well! Completely forgot about them! :o