Can’t get JavaScript files to run in SharePoint?
Having trouble getting JavaScript files to run in your SharePoint site? Make sure you set the LoadAfterUI=”true” attribute in your ScriptLink tag.
Here is an example:
<SharePoint:ScriptLink ID=”MyBaseID” Name=”~Site/_catalogs/masterpage/MyPathtoJavascriptFile/mycustomjavascriptfile.js” runat=”server” OnDemand=”false” LoadAfterUI=”true” Localizable=”false”/>
Leave a Reply
You must be logged in to post a comment.