Hi,
I'm trying to add an external javascript file to my code but so far am not having any luck getting it working. Any help would be appreciated!
The javascript file just contains a simple function with an alert('hello world').
I add the <script> tag to my webspeed file between the <head> tags:
{&out} '<script language="javascript" type="text/javascript" src="/js/hellow.js"></script>'.
When this function is called within the html code, it just returns a javascript error 'object not found', so it is not finding the hello world function.
however, when I place the javascript itself within the <script> tags in my webspeed file, the javascript works fine when it is called from the html code.
{&out} '<script language="javascript" type="text/javascript" >
function hw()~{
alert("hello world");
~}
<script>'.
I've placed the javascript file in the same directory where my other source code is run from and the web server is on my local machine.
Is there any reason why I can't get the external javascript file to work? Is there any other settings on my machine I should look at. I've already ticked the IE property to 'Run Active Content on my PC'.
Again any help would be greatly appreciated as have been banging my head off a wall over this!
I'm trying to add an external javascript file to my code but so far am not having any luck getting it working. Any help would be appreciated!
The javascript file just contains a simple function with an alert('hello world').
I add the <script> tag to my webspeed file between the <head> tags:
{&out} '<script language="javascript" type="text/javascript" src="/js/hellow.js"></script>'.
When this function is called within the html code, it just returns a javascript error 'object not found', so it is not finding the hello world function.
however, when I place the javascript itself within the <script> tags in my webspeed file, the javascript works fine when it is called from the html code.
{&out} '<script language="javascript" type="text/javascript" >
function hw()~{
alert("hello world");
~}
<script>'.
I've placed the javascript file in the same directory where my other source code is run from and the web server is on my local machine.
Is there any reason why I can't get the external javascript file to work? Is there any other settings on my machine I should look at. I've already ticked the IE property to 'Run Active Content on my PC'.
Again any help would be greatly appreciated as have been banging my head off a wall over this!