Questions tagged [scriptlink]

ScriptLink is a class of the Microsoft.SharePoint.WebControls namespace that provides properties and methods for registering resources, such as scripts, on a page so that they can be requested when the page is rendered.

Filter by
Sorted by
Tagged with
2 votes
0 answers
244 views

What means OnDemand, LoadAfterUI, Localizable attributes in SharePoint:ScriptLink tag?

I'm developing simple sharepoint hosted app. on app's default.aspx i see the below scriptlink tag. but i do not understand the need of OnDemand, LoadAfterUI, Localizable attributes. <SharePoint:...
Curious's user avatar
  • 405
2 votes
2 answers
1k views

Set a ribbon user custom action using PowerShell

How to fully defined and add a user custom action using PowerShell. I was able to define and add a custom action but I don't know how to point to a JS file that contains the JavaScript I would like to ...
ameliapond's user avatar
2 votes
2 answers
851 views

Adding jQuery to Seattle masterpage

I'm trying to add jquery to my Seattle masterpage. I followed these directions which say to add the following (modified for my locations) line to the Seattle.html file. <!--SPM:<SharePoint:...
Rothrock's user avatar
  • 3,010
1 vote
1 answer
1k views

Order of js scripts added by ScriptLink control and CustomAction

In our team we have a convention that common use js libraries, for example jQuery, are registered somehow in website, so in custom web parts we shouldn't register it again. In one website jQuery is ...
Oleg Savelyev's user avatar
3 votes
2 answers
3k views

How to force my custom SharePoint:Scriptlink to run as the last script inside my page layout

I am working on an enterprise wiki .aspx page layout. and i added the following script inside my page layout:- <SharePoint:Scriptlink runat="server" Name="~sitecollection/Resources/PageLayout.js" ...
John John's user avatar
0 votes
2 answers
762 views

CannotMakeBrowserCacheSafeLayoutsUrl for ScriptLink in CustomAction

I'm trying to reference a JS file in (multiple) site-collections by using a Custom Action with Location=ScriptLink as described by sadomovalex. Referencing the file in the site-collection where the ...
ben's user avatar
  • 162
0 votes
2 answers
689 views

Embed Javascript for a site collection in SPO

What is best practice to embed javascript for an SPO site collection? I was hoping to run the OfficeDev/PnP Core.EmbedJavaScript but it requires side loading of apps. I'm looking for a ...
Gitte Dreyer's user avatar
0 votes
1 answer
84 views

Specify a Root Path of hosted app for script links in SharePoint hosted app?

I'm writing script reference in custom master page, and don't want to change the scripts for subfolder pages. Is there a way to make the path relative to the root directory? for example: <link ...
Mrunal Shidurkar's user avatar
1 vote
1 answer
736 views

CSR: ScriptLink/Custom Action CDN Libraries load after JSLinked files are loaded

I am almost to 2.0 with the generic iCSR support library. Having some issues with deployment: Adding the library as SiteCollection ScriptLink/Custom action loads it before msajaxbundle where Type....
Danny '365CSI' Engelman's user avatar
0 votes
0 answers
119 views

Sharepoint 2013 - replacing links in Picture Slideshow

I'm using SP2013. The links in the OOTB Picture slideshow link directly to the image. I need to change the array that is default with some sort of script (which I'm not great with). I did find this ...
garvon-77's user avatar
  • 579
4 votes
2 answers
2k views

Unable to Unregister UserCustomActions added at location scriptlink using CSOM

Below code was used to add Custom action to site <script type="text/javascript" src="_layouts/15/sp.runtime.js"></script> <script type="text/javascript" src="_layouts/15/sp.js"><...
Ankitkumar Malde's user avatar
1 vote
2 answers
711 views

Can ScriptLink load a remote file?

When I try to load a remote file through ScriptLink it doesn't work. <!--SPM:<SharePoint:ScriptLink ID="ScriptReg2" language="javascript" name="https://somesite.blob.core.windows.net/scripts/my-...
matt's user avatar
  • 1,305
0 votes
2 answers
5k views

SharePoint Online Plan 1 and jQuery

I'm working on a SharePoint Online Plan 1 Site Collection in preparation for our Office 365 deployment and I'm getting a lot of requests for small UI changes and tweaks (make certain Library Columns ...
Zach Anderson's user avatar
2 votes
1 answer
484 views

How to create webpart page using ECMA Script

I have tried to create webpart page using ECMA script, but did not get the right solution. Example : I have created two text-boxes one for "page name" ,second for "web-part name". when user click on ...
Sonu's user avatar
  • 63
1 vote
1 answer
217 views

Referencing JS in master page: Using MS and ME tags versus not using them

I've seen scripts referenced in 2 ways. What is the purpose of the MS and ME tags? Use them or not? <!–MS:<SharePoint:ScriptLink ID=”ScriptLink21″ Name=”sp.js” runat=”server” OnDemand=”false” ...
Das's user avatar
  • 319
1 vote
1 answer
759 views

Script file file not being loaded through ScriptLink custom action - SharePoint app

I am having trouble with script link custom actions. I am building a SharePoint app, and I successfully added a site-scope custom action pointing to a script file in the Style Library, as I want this ...
Phil Gref's user avatar
  • 171
14 votes
2 answers
28k views

When to use scriptlink, scriptblock and script

I have seen an application page where the developer using scriptlink, and below that just , I was wondering when would each one be used?
SharePoint Freak's user avatar
2 votes
2 answers
1k views

JavaScript error while added jquery library to standard teamsite

I have a standard SharePoint 2013 Teamsite template with "seattle" masterpage and added jquery in the head of the seattle.html to solve some branding issues(screen 1). The problem is that I always get ...
lex's user avatar
  • 449
3 votes
1 answer
2k views

Reference JScript files at the end of page using ScriptLink Tag

Due to performance problems, we decided to reference javascript files at the end of the master page file. However, if we reference javascript files at the end of master page using ScriptLink Tag, the ...
Tolga's user avatar
  • 171
2 votes
1 answer
1k views

Load page error when I use ScriptLink in the page head

Here is the beginning of my custom SharePoint Application Page: <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, ...
Boris's user avatar
  • 1,410