I've had a problem that's been driving me crazy for the last two hours. I was eventually going to post the problem here, but I've managed to find what's causing the problem and fix it. I am , however, at a complete loss as to why it was causing a problem. Let me explain:
You may or may not be aware of the annoying pieces of javascript that Symantec(Norton) products throw into web pages without asking. For instance whenever I download a web page I get the following code inserted between the head tags:
I've recentley noticed this one being thrown in as well, beneath the closing html tags:
Now to how these relate to my problem. I created a help system for a friend's web site using javascript onclick pop ups. I designed the pop-ups on my own site, and then moved them to his once completed (on a different server). When I tried them on his site, they didn't work. The page that they were on on his site had a .php extension. This was the very last thing I considered after 2 hours of trying to solve the problem. When I changed the .php for a .html. The links worked.
So I went back to my site(different server) and tried the page as a .html and a .php extension. Both worked fine. Now I'm not very hot on javascript, but I do now that it's a client side language. I figured that there must be something different in the code being generated from that page that the browser is having trouble with.
I found out that the difference between the source code from the .php page on my friends server and the others is that Norton for some reason wasn't adding that second piece of code above underneath the closing html tag. I copied and pasted the code into the .php page and the pop ups worked fine.
So my question is threefold:
1. What does all of code that Norton inserts do exactly? (I'm guessing the first bit is to supress errors).
2. Why do you think it was not written in to the .php page when it was put on my friends server? And why did this cause a problem?
3. Do all firewalls add code to web pages or is it just Norton?
You may or may not be aware of the annoying pieces of javascript that Symantec(Norton) products throw into web pages without asking. For instance whenever I download a web page I get the following code inserted between the head tags:
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>
I've recentley noticed this one being thrown in as well, beneath the closing html tags:
Code:
<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>
Now to how these relate to my problem. I created a help system for a friend's web site using javascript onclick pop ups. I designed the pop-ups on my own site, and then moved them to his once completed (on a different server). When I tried them on his site, they didn't work. The page that they were on on his site had a .php extension. This was the very last thing I considered after 2 hours of trying to solve the problem. When I changed the .php for a .html. The links worked.
So I went back to my site(different server) and tried the page as a .html and a .php extension. Both worked fine. Now I'm not very hot on javascript, but I do now that it's a client side language. I figured that there must be something different in the code being generated from that page that the browser is having trouble with.
I found out that the difference between the source code from the .php page on my friends server and the others is that Norton for some reason wasn't adding that second piece of code above underneath the closing html tag. I copied and pasted the code into the .php page and the pop ups worked fine.
So my question is threefold:
1. What does all of code that Norton inserts do exactly? (I'm guessing the first bit is to supress errors).
2. Why do you think it was not written in to the .php page when it was put on my friends server? And why did this cause a problem?
3. Do all firewalls add code to web pages or is it just Norton?