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