I have a webpage that uses javascript that I'm trying to implement in my SharePoint 2010 site, but I'm running into some trouble with the javascript. I've tested everything outside of sharepoint and it works fine, so the issue is something I'm doing wrong in sharepoint. I'm trying to implement as follows:
- html is saved in a .txt file in SiteAssets
- javascript is saved in a .js file in SiteAssets
- .txt file includes the following code:
<SharePoint:ScriptLink ID="ScriptLink1" language="javascript" name="/SiteAssets/HOME.js" Localizable="false" runat="server"/>
The html loads fine, the javascript doesn't work at all. I suspect the issue is with how I'm trying to link to the javacript file but I'm not sure what I should be doing differently.
Can anyone help?
SharePoint:ScriptLink
please try to use<script></script>
tag to load javascript and see if it works..