R
rh
Executing the script given below Opera, Netscape and Mozilla
successfully load the js file in both the "main" and "test" window.
However, while IE 6 manages to load OK in "main", it produces the
"Load failed in test" alert.
IE behaviour is the same if a local file is used for the js source, so
the problem doesn't appear to be zone security related.
Any ideas of what's wrong here, or what needs to be done to get it to
work in IE?
Thanks,
../rh
<html>
<head>
<script type="text/javascript"
src="http://www3.telus.net/rhall/testLoad.js"></script>
<script>
self.name = "main";
if (typeof myFunc != "undefined") alert("Loaded OK in "+self.name);
else alert("Load failed in "+self.name);
var win = window.open("","test");
win.document.open();
win.document.write(
'<html>\n'
+ '<body>\n'
+ '<script type="text/javascript"
src="http://www3.telus.net/rhall/testLoad.js"> <\/script>\n'
+ '<script>\n'
+ ' if (typeof myFunc != "undefined") alert("Loaded OK in
"+self.name);\n'
+ ' else alert("Load failed in "+self.name);\n'
+ '<\/script>\n'
+ '</body>\n'
+ '</html>\n'
);
win.document.close();
</script>
</head>
<body>
</body>
</html>
successfully load the js file in both the "main" and "test" window.
However, while IE 6 manages to load OK in "main", it produces the
"Load failed in test" alert.
IE behaviour is the same if a local file is used for the js source, so
the problem doesn't appear to be zone security related.
Any ideas of what's wrong here, or what needs to be done to get it to
work in IE?
Thanks,
../rh
<html>
<head>
<script type="text/javascript"
src="http://www3.telus.net/rhall/testLoad.js"></script>
<script>
self.name = "main";
if (typeof myFunc != "undefined") alert("Loaded OK in "+self.name);
else alert("Load failed in "+self.name);
var win = window.open("","test");
win.document.open();
win.document.write(
'<html>\n'
+ '<body>\n'
+ '<script type="text/javascript"
src="http://www3.telus.net/rhall/testLoad.js"> <\/script>\n'
+ '<script>\n'
+ ' if (typeof myFunc != "undefined") alert("Loaded OK in
"+self.name);\n'
+ ' else alert("Load failed in "+self.name);\n'
+ '<\/script>\n'
+ '</body>\n'
+ '</html>\n'
);
win.document.close();
</script>
</head>
<body>
</body>
</html>