I'm feeling quite puzzled by this small piece of code, as it appears to be the simplest thing you'll come across today. Despite that, I can't help but seek guidance because I've been staring at it for what feels like an eternity and cannot understand why it refuses to cooperate.
index.html
<html>
<head>
<SCRIPT type="text/javascript" src="include.js"></SCRIPT>
</head>
<body onload="test()">
<p id="center"></p>
</body>
</html>
include.js
function test()
{
document.getElementByID('center').innerHTML="testing";
}
Every time I open index in a browser window, all I get is a blank page. I even tried inserting an alert window at the beginning of the test() function and surprisingly, it did trigger. However, if I move the alert after the "testing" line, nothing happens.
Your help would be greatly appreciated.