PDA

View Full Version : Javascript Question



fileserverdirect
08-10-2007, 04:10 PM
Hi,

I am making a PHP Web page and the reason that I am posting in the javascript section is beacuse of the folowing code that I dont get. EVERY Page I make this stupid code comes up in the <head> section and after the </html>. I cannot get rid of it? Can any one tell me how?
Here is the code:


<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>
NOTE: I did not write this code, It automaticlly adds it in.

jscheuer1
08-10-2007, 04:37 PM
When does it appear? Before, or after you upload your page to your host? If before, it is your editor, either get a better one or change its settings. If after, it is your host, and they must have a policy against pop ups.

fileserverdirect
08-10-2007, 05:14 PM
Yes, It appears when I view the soruce of the document on the server. I would normally not care, but I want My Document to be 100% Valid and it isn't beacuse the <script> tag must have a attribute 'type="text\javascript"' and I cannot change it.

jscheuer1
08-10-2007, 05:36 PM
You could ask your host to change their code so that the pages that it is added to will validate. They might be open to that. Also, if this is a free or cheap hosting account, by paying a little or a little more to get a higher level account, they might stop putting it on there as part of the upgrade - ask them for details. Or, you could get a different host.

Twey
08-10-2007, 06:21 PM
This code is added on the fly by Norton Antivirus, I believe. It's not in your actual page and shouldn't affect its validity.

fileserverdirect
08-10-2007, 06:38 PM
Twey: It cannot be Norton Anitivirus, beacuse when I download the page through a HTML Validator, it still shows up, even on a diferent computer that does not have Norton Anti Virus. Besides it is added on the server, I don't think Norton Anti Virus Knows my FTP Codes :)

Twey
08-10-2007, 07:05 PM
Hm, really? Must be something on the server, then, I guess. Definitely looks like NAV code though.

fileserverdirect
08-10-2007, 07:34 PM
fileserverdirect = :confused:

O.K. I turned off pop-up blocking on my computer in N.A.V. Ok, it took the code away completely except this:

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

function SymError()
{
return true;
}

window.onerror = SymError;

//-->
</script> in the head section. It still won't pass validation beacuse of the "type" attribute. HOWEVER It registers fine and says "Your Document is 100% Valid!" on the other computer. How can I make it so that it is valid on most computers?

Twey
08-10-2007, 07:44 PM
What the heck? The validator is an objective self-contained client, the computer on which you check should make no difference at all. Were you validating by direct input or upload, perhaps?

fileserverdirect
08-10-2007, 08:03 PM
I was not using W3C's Validator, I was using CSE HTML Validator v8.0 http://www.htmlvalidator.com/standard/. It is alot better than W3C's online one. It is a program, and as we all know Programs have a wider seletion of things it can do over Online ones. But when W3C told me to add a DOCTYPE, The whole webpage went all out of order and things that used to be in a striaght line were all over the place.

jscheuer1
08-11-2007, 04:47 AM
fileserverdirect = :confused:

O.K. I turned off pop-up blocking on my computer in N.A.V. Ok, it took the code away completely except this:

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

function SymError()
{
return true;
}

window.onerror = SymError;

//-->
</script> in the head section. It still won't pass validation beacuse of the "type" attribute. HOWEVER It registers fine and says "Your Document is 100&#37; Valid!" on the other computer. How can I make it so that it is valid on most computers?

It is now apparent that N.A.V. is adding this code on the client side, not on the server side. And that without it, the page is valid. You cannot be responsible for what other computers (on the client side, even if it is your own) add to your code. Rest assured this code has nothing to do with validation. If your page is valid without it, your page is valid. Period.

dbldee
08-13-2007, 07:10 PM
NAV and McAfee among others AV software manufacturers are adding pop-up blockers on client sw.
this is probably what you are seeing.