1

I am building and testing a local sharepoint site using Shareboot but can't get my link to JQuery in the Shareboot master page working. When I add it I'm only getting a blank page returned. I take my link out and the page is working again.

Here is the code I'm using and I'm placing this just before the </head> in the masterpage:

<SharePoint:ScriptLink language="javascript" name="http://2008-sp-2013-jc/sites/labeller/Style%20Library/jquery-min.js" runat="server" Localizable="false" />

Anyone got any help on what I'm doing wrong?

Additional: The file location is correct.

Thanks.

  • Can you try it as just a normal script tag first and see if that works? ScriptLink refers to the server file system I believe. – Eric Alexander Jan 8 '15 at 15:58
  • Brilliant. I never thought that would work which is why I didn't try it. I Googled how to add the link in and got the above ... sometimes Google is not your friend. Thanks for the help. – JCooke Jan 8 '15 at 16:04
1

ScriptLink directives will always look in the /_LAYOUTS/1033 directory for your script. If you are not deploying the files to the file system and instead using the Style Library, you need to use the standard <script> tag.

<script type="text/javascript" src="http://2008-sp-2013-jc/sites/labeller/Style%20Library/jquery-min.js"></script>


With ScriptLink you have the ability to specify when you want the script to load asynchronously or after the after the page is ready. The ScriptLink will always look in /_LAYOUTS/1033 for the scripts.

http://tommdaly.wordpress.com/2010/12/16/scriptlink-vs-whats-the-difference/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.