A
Alaric
O.k... I've divided my source code into a few different files for
organizational purposes using the aptly named function Include I got
online. I think the rest of the code is irrelevant, but if I'm wrong,
just request it. Here's the HTML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NorthWood HighSchool Environmental Awareness Society</title>
<script type="text/javascript" src="javascript/tools.js"></script>
</head>
<body>
<div style="width:800px; border:#CCC thick inset; background-
color:Black; color:#FFFFFF;" class="ticker">
Please enable javascript to view this news ticker.
</div>
<div class="ticker">
There is no new news from iraq.
</div>
</body>
</html>
And here's the master javascript file that include()'s the rest of
them.
// JavaScript Document
function include(filename)
{
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.src = filename;
script.type = 'text/javascript';
head.appendChild(script);
}
include("/javascript/classes.js");
include("/javascript/fade.js");
include("/javascript/ticker.js");
alert("Hello World");
This code works just fine. However when I comment out the last line,
(//alert("Hello World"), the window.onload that I set in javascript/
classes.js fails to load. I've tested it on two different computers
with the ie7 browser, and both fail. Mozilla reads it just fine...
Which can lead to only one of two roads. Either Microsoft is insane,
or I am. Can anyone spot the bug?
organizational purposes using the aptly named function Include I got
online. I think the rest of the code is irrelevant, but if I'm wrong,
just request it. Here's the HTML.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NorthWood HighSchool Environmental Awareness Society</title>
<script type="text/javascript" src="javascript/tools.js"></script>
</head>
<body>
<div style="width:800px; border:#CCC thick inset; background-
color:Black; color:#FFFFFF;" class="ticker">
Please enable javascript to view this news ticker.
</div>
<div class="ticker">
There is no new news from iraq.
</div>
</body>
</html>
And here's the master javascript file that include()'s the rest of
them.
// JavaScript Document
function include(filename)
{
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.src = filename;
script.type = 'text/javascript';
head.appendChild(script);
}
include("/javascript/classes.js");
include("/javascript/fade.js");
include("/javascript/ticker.js");
alert("Hello World");
This code works just fine. However when I comment out the last line,
(//alert("Hello World"), the window.onload that I set in javascript/
classes.js fails to load. I've tested it on two different computers
with the ie7 browser, and both fail. Mozilla reads it just fine...
Which can lead to only one of two roads. Either Microsoft is insane,
or I am. Can anyone spot the bug?