I have an external file, TestVar.js with a single line.
NewsA("This is a test.","test.pdf","TEST")
Within my HTML I wish to use the array variables from TestVar.js, but
can't seem to get them loaded for use. The following is what I have,
but doesn't work. If I directly place the NewsA array in the script
instead of trying to call it from the js it works just the way I want
it, but I really need the external file. What am I doing wrong?
*************
Start of test 1
<div style="text-align: center;"><font color="#ff0000">
<script language="javascript">
var NewsA=new Array();
</script>
<script type="text/javascript" src="TestVar.js"
language="javascript"><font color="#ff0000">
var NewsText = NewsA[0];
var NewsPath = NewsA[1];
var NewsLink = NewsA[2];
document.write(NewsText);document.write(" <a href =
"+NewsPath+">"+NewsLink+"</a>")</script><br>
</font>
</div>
End of Test 1
Mike
*************