Reputation: 89
I know it is a silly question but my javascript works on very good locally, but on a some.com hosting server it doesn't work at all. Can any one please help me to figure it out my mistake?
Here is my javascript links:
<script type="text/javascript" language="javascript" src="../../Library/Client/Js/Utility.js"></script>
<script type="text/javascript" language="javascript" src="../../Library/Client/js/TlBarAction.js"></script>
<script type="text/javascript" language="javascript" src="../../Library/Client/Js/ControlsFunc.js"></script>
<script type="text/javascript" language="javascript" src="../../Library/Client/Js/Menu.js"></script>
Thanks
Upvotes: 0
Views: 11088
Reputation: 82
If you are running in the root folder of your site then using ../ on a shared hosting server is not allowed as it breaks you out of your container. You need to make sure that you have your scripts within your root and then use ~/ or just the folder name accordingly. If you are not in your root folder then you can use ~/ but only if your website is being hosted as its own application and not just a subdirectory.
I would suggest trying Library/Client/Js/Utility.js first, then /Library/Client/Js/Utility.js and then ~/Library/Client/Js/Utility.js to see which works.
Upvotes: 0
Reputation: 1230
Assuming your paths are correct, is your server case-sensitive? Your code has three "JS" (capital "J") and one "js" (lowercase "j") references.
This will work fine, as is on a non-case-sensitive OS like Windows but may NOT work on a case-sensitive OS.
Upvotes: 2
Reputation: 6461
If your Folder inside your project configuration path then no need to give like this ../../
If your Folder inside your project just use like this src="~/Library/Client/Js/Utility.js"
If your Folder Outside of folder your project src="../Library/Client/Js/Utility.js"
(one Folder)
as per the folder count you have to add ../
Check Your Some.Com IIS Configuration whether the js path correctly configured or not.
Hope this may helpful.,
Upvotes: 0