i have an html page and an external javascript page.
in the head section of my html i define two variables that are equal to the return value of functions in my .js file.
but when i try and access these variables from the head of my html in the body, I get a “variableName” is not defined error. what am i doing wrong?
thanks for the help
[code]
<head>
<script src=”datetime.js” type=”text/javascript”/>
<script type=”terxt/javascript”>
var timeStr = datetime.showDateTime();
var imgNum = datetime.getImage();
</script>
</head>
<body>
<script type=”text/javascript”>
document.write(“<img id=’image’ src=’image” + imgNum + “.jpg’ alt=” />”);
</script>
</body>