ok let me try this again cause a variable was posted wrong before and I don't want the to confuse things. Below is a complete html plus the js file being loaded. This works on a local basis but not when uploaded on my site.
--------------------------------------------------------
<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
<SCRIPT type=text/javascript>
function loadJSscript(TheFile){
jsscriptFileNameFinal=TheFile;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = jsscriptFileNameFinal;
document.getElementsByTagName('head')[0].appendChild(script);
alert(TopicsList)
}
</SCRIPT>
</head>
<BODY onload="loadJSscript('d_Formats_VRML.js')">
Testing
</BODY></HTML>
--------------------------------------------------------
THE js file 'd_Formats_VRML.js'
var TopicsList = [
["Avatars"],
["Browser"],
["Games"],
["Interactive Worlds"],
["Medical"],
["Models"],
["Science"],
["Worlds"]
];
majorTopic="Formats"
mainTopic="VRML"
alert("TopicsVRML.js Loaded")
--------------------------------------------------------
Notice the "alert(TopicsList)" that should fire back the array in the js file. It does not when uploaded to web site. However, it does when all is local.
--------------------------------------------------------
<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
<SCRIPT type=text/javascript>
function loadJSscript(TheFile){
jsscriptFileNameFinal=TheFile;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = jsscriptFileNameFinal;
document.getElementsByTagName('head')[0].appendChild(script);
alert(TopicsList)
}
</SCRIPT>
</head>
<BODY onload="loadJSscript('d_Formats_VRML.js')">
Testing
</BODY></HTML>
--------------------------------------------------------
THE js file 'd_Formats_VRML.js'
var TopicsList = [
["Avatars"],
["Browser"],
["Games"],
["Interactive Worlds"],
["Medical"],
["Models"],
["Science"],
["Worlds"]
];
majorTopic="Formats"
mainTopic="VRML"
alert("TopicsVRML.js Loaded")
--------------------------------------------------------
Notice the "alert(TopicsList)" that should fire back the array in the js file. It does not when uploaded to web site. However, it does when all is local.