Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
14 views

How to write one file, with dependencies using Sharepoint:Scriptlink, to be included in ascx controls

Currently, I have several control files (ascx) that have their own 'includes' between javascript 'script' tags: document.write('<link href="/SiteAssets/Content/jquery.ui.1.10.0.ie.css" rel="...
1
vote
0answers
131 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:...
0
votes
2answers
512 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 ...
1
vote
2answers
409 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:...
1
vote
1answer
908 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 ...
3
votes
2answers
2k 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" ...
0
votes
2answers
417 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 ...
0
votes
2answers
522 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 ...
0
votes
1answer
79 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 ...
1
vote
1answer
577 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....
0
votes
0answers
96 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 ...
4
votes
2answers
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"><...
1
vote
2answers
518 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-...
0
votes
2answers
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 ...
2
votes
1answer
438 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 ...
1
vote
1answer
198 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” ...
1
vote
1answer
701 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 ...
12
votes
2answers
23k 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?
2
votes
2answers
946 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 ...
3
votes
1answer
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 ...
2
votes
1answer
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, ...