IE7 inserts Javascript into my html

R

r.e.s.

[I couldn't find an IE7 newsgroup in which to post this]
[posted earlier to microsoft.public.scripting.vbscript ]

If I have even the simplest VBScript in an html file on my
server, when it's opened online in IE7 a mass of Javascript
gets inserted. This is often producing errors that prevent
the VBScript from running -- script that runs perfectly
when opened in IE7 *locally*.

Can anyone please tell me what's going on? (I'd be
interested to know if it occurs also with IE6, etc.)

I'll close with a simple *error-free* example just to
illustrate the "Javascript insertion" phenomenon.

An html file http://r.s.home.mindspring.com/Misc/test.htm
contains only this ...

<HTML><HEAD></HEAD><BODY>
<SCRIPT LANGUAGE="VBScript">
document.write("This is a test!")
</SCRIPT></BODY></HTML>

.... yet when opened online in IE7, View/Source shows this
mess (which in this case does not produce any errors as
do more complicated cases):

<HTML><HEAD></HEAD><BODY>

<script language="VBScript">
</script>

<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="VBScript">
document.write("This is a test!")
</SCRIPT></BODY></HTML>

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

SingaporeWebDesign

Hello,

I believe it is inserted by Norton Personal Firewall or a Norton product,
for reasons I am not aware.

Try disabling Norton Antispam if you have it.

Otherwise, somebody will have to advise us why and how to remove it.
 
G

Guest

I Agree with Singapore, it is your Anti-Virus and specially it is a VBs, AV
think of as a malicious attack/script and try to show you and i think it tell
what line is need to be edit to allow this site to run!.
Try to go through the Firewall settings and ease it from Block to High or
standard
HTH.
nass

SingaporeWebDesign said:
Hello,

I believe it is inserted by Norton Personal Firewall or a Norton product,
for reasons I am not aware.

Try disabling Norton Antispam if you have it.

Otherwise, somebody will have to advise us why and how to remove it.

--
Singapore Web Design
http://www.bootstrike.com/Webdesign/
Singapore Web Hosting
r.e.s. said:
[I couldn't find an IE7 newsgroup in which to post this]
[posted earlier to microsoft.public.scripting.vbscript ]

If I have even the simplest VBScript in an html file on my
server, when it's opened online in IE7 a mass of Javascript
gets inserted. This is often producing errors that prevent
the VBScript from running -- script that runs perfectly
when opened in IE7 *locally*.

Can anyone please tell me what's going on? (I'd be
interested to know if it occurs also with IE6, etc.)

I'll close with a simple *error-free* example just to
illustrate the "Javascript insertion" phenomenon.

An html file http://r.s.home.mindspring.com/Misc/test.htm
contains only this ...

<HTML><HEAD></HEAD><BODY>
<SCRIPT LANGUAGE="VBScript">
document.write("This is a test!")
</SCRIPT></BODY></HTML>

... yet when opened online in IE7, View/Source shows this
mess (which in this case does not produce any errors as
do more complicated cases):

<HTML><HEAD></HEAD><BODY>

<script language="VBScript">
</script>

<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="VBScript">
document.write("This is a test!")
</SCRIPT></BODY></HTML>

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

r.e.s.

nass said:
I Agree with Singapore, it is your Anti-Virus and specially it is a VBs, AV
think of as a malicious attack/script and try to show you and i think it tell
what line is need to be edit to allow this site to run!.
Try to go through the Firewall settings and ease it from Block to High or
standard
HTH.
nass

Thanks, both of you. The first posting on the
following page seems to have an answer ...

http://www.webmasterworld.com/forum91/4967.htm

All that's needed, apparently, is simply inserting
<!-- as the first thing on the page and changing
nothing else; i.e., changing my example to the
following seems to have fixed the problem:

<!--
<HTML><HEAD></HEAD><BODY>
<SCRIPT LANGUAGE="VBScript">
document.write("This is a test!")
</SCRIPT></BODY></HTML>

It was my Norton Internet Security that was the
problem -- specifically the Ad Blocker (ironically
the Script Blocker feature in Norton Antivirus
seemed to have no effect). In any case, the above
simple fix appears to over-ride the Norton settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top