Hi,
I’m experiencing some problems with an external .js
On my Cpanel account I have a number of Addon Domains. Each domain’s index.htm needs access to one and the same .js file, which is located in the root.
This is the structure of my Cpanel account:
public_html/external.js
public_html/domain_1/index.htm
public_html/domain_2/index.htm
public_html/domain_3/index.htm
public_html/domain_4/index.htm
public_html/domain_5/index.htm
…and so on
In each index.htm I’ve put the following code:
<html>
<head>
<script language=”javascript” src=”../external.js”></script>
</head>
<body>
<img src=”../image.gif” onClick=”my_external_function()”>
</body>
</html>
The image loads fine, but when I run the function I get a javascript error. Why is that? If the image loads using “../” then the external .js should run fine as well, right?
Would appreciate any input on this matter.