Javascript is a dynamic computer programming language, most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.

learn more… | top users | synonyms (2)

2
votes
1answer
245 views

SharePoint 2013 - How to query members/users of an Active Directory group?

I have written some JavaScript code to get all groups and their users with permissions to a SharePoint list. Beside SharePoint groups there are also AD groups with permissions. The Problem is, that I ...
2
votes
1answer
32 views

CSR Template PercentComplete with skale 10 times blocks range 10,20,30,40,50,60,70,80,90,100 only

I created new PercentComplete bar but how can I set percentage to only 10,20,30,40,50,60,70,80,90,100 alowed values? function percentCompleteEditFiledTemplate(ctx) { var formCtx = ...
0
votes
1answer
32 views

Building a To-Do List with jQuery and Local Storage

Hi i am working on a project to do task list where every thing work fine but i am not able to store data in list in following link data is store in var data = ...
1
vote
1answer
148 views

use SP.UI.Dialog on page load without ExecuteOrDelayUntilScriptLoaded

I know I can do this: ExecuteOrDelayUntilScriptLoaded(function() { SP.UI.ModalDialog.showModalDialog(..) }, "sp.js"); But I want to call SP.UI.ModalDialog.showModalDialog as soon as the page ...
2
votes
3answers
112 views

Changing A Lists row color based on a number

So I have a calculated field in my List view that gives the number of days from the contract end date - current date. I wrote the following script to change the color of the row if less then 90 or ...
1
vote
1answer
67 views

CSR View Fields dynamic with Field names from View?

I try one CSR file for all views but the views have not all the same columns Is it possible to make the Fields in TemplateOverrides dynamic with the Field names from the current View? ...
2
votes
1answer
35 views

How can I see what list items are in what folder?

I have some code that shows me all the items (files and folders) in a document library, but everything appears on the same level. How can I see which items sit in which folders? Currently the output ...
0
votes
0answers
32 views

Sharepoint & Javascript: Handling Access Denied Error with Open In Windows Explorer. Catch Always Executing

So I am trying to handle an error when I attempt to open a folder location in windows explorer from SharePoint. If the website is not in your trusted sites while in IE the browser will throw an Access ...
0
votes
2answers
77 views

Add list item using JavaScript request failed

I am trying to add a folder to a library on my site, however I am finding it extremely difficult to complete such a simple task. The function executes properly (no errors or exceptions) however the ...
0
votes
1answer
36 views

Join 3 lists initiating the join from the middle list

I need to join 3 Lists, but i have no access to the on-prem sharepoint to test my idea right now. So I hope anybody can tell me, if it's possible. I have Lists A, B and C. LookupFields are connected ...
0
votes
0answers
19 views

Easy Tabs in SharePoint 2010 & preservation of easy tabs for SharePoint 2013

I am looking into ways to implement easy tabs for the display of a master glossary for my team. I have a code but I am not sure where to put it either in the content editor web part or in the general ...
1
vote
0answers
44 views

Trouble uploading file to Document library using REST api and JSOM

So I have been trying for the last day or so to get code right to upload a file to a newly created document library based off a custom template. Based on my research I know I am getting all of the ...
0
votes
2answers
127 views

reference ctx.CurrentFieldSchema with 'this' unsafe in CSR code?

In how we must code examples on MSDN: https://code.msdn.microsoft.com/office/Client-side-rendering-code-0a786cdd I see var priority = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; Is it unsafe to ...
0
votes
1answer
42 views

calculated column javascript css cewp

Embedding javascript into a Calculated column works well, such as in this case Using HTML to recalculate calculated column However, where the following code ="function setTaskID(TR){" &" var ...
0
votes
1answer
60 views

404 Missing jQuery in _layouts folder

I have been stuck for a while trying to find out what exactly the _layouts folder does for SharePoint and why it may be causing any script I write and attempt to deploy on the site to not work. They ...
1
vote
0answers
61 views

Custom Action not showing on Site Settings pages

I have a little (crude) javascript function that should add a javascript file to every page on my site using custom actions (including the subsites via a recursive function). It seems to work well on ...
3
votes
0answers
70 views

SP's JavaScript function to create pagination

SharePoint 2013 here. I need to create a pagination of results I get from an external web service. I want to use the look and feel of SharePoints pagination: Ideally I could call SharePoint's ...
1
vote
0answers
28 views

Accessing JavaScript libraries for basic tasks

I ran into an error while trying to gain access to the required libraries for JavaScript development. I copied this code straight from Microsoft's documentation, however when it is executed on my ...
3
votes
1answer
183 views

SP.Taxonomy.js TypeError: b.get_path is not a function

I'm trying to display the terms of a site but I can't create a instance of TermSession object. context = SP.ClientContext.get_current(); var taxonomySession = ...
1
vote
1answer
55 views

Modal Dialog: How to Disable Redirect on Save

I have a wiki page with a link on it which when clicked opens a modal dialog to a document set's new form page. When the Cancel button on the modal dialog is clicked, the dialog closes, as expected. ...
1
vote
2answers
50 views

EventListener for List changes in Sharepoint Hosted app

I'm developing a sharepoint hosted Add-in, which should react to a change of a list field of a list in the hostweb. I need some kind of EventListener for a list field. For example: List field Gets ...
0
votes
1answer
140 views

Adding List view web part to a page using javascript

In a page, I need to add a list view web part when the page is loaded. Is it possible using javascript? Actual situation is that a list has a column States. It can have multiple values. So in ...
0
votes
0answers
33 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 ...
3
votes
2answers
226 views

SharePoint 2013 list using multiple drop down list as filters

Long time reader, first time poster... I have found many of the best solutions for my problems here, so thank you for all your hard work! I have been trying to get this problem figured out for few ...
2
votes
1answer
32 views

Upload documents from other websites

I want to upload documents from a ASP MVC website to my Sharepoint document library. Found a lot of websites about this topic, but most of them are focussed on uploading documents from within ...
4
votes
2answers
253 views

Disable Edit Item from the SharePoint Ribbon

In my sharepoint 2013 list dispform.aspx, I have one webpart with 'save' button . Once that save button is clicked i want to disable the 'Edit Item' OOTB option from the ribbon . How can i achieve ...
3
votes
0answers
155 views

ctx.CurrentItem undefined in new function

I am editing a item display template in SharePoint 2013. The following problem occurs: ctx.CurrentItem becomes undefined in a custom function. How can I solve this? Here is a little code snippet: ...
2
votes
1answer
57 views

Async wait till variable is set in the display template

I have a problem with excuting the script in the right order. I have a custom.js which is loaded at the top of the masterpage. The following function is included: var results; var followers; ...
1
vote
0answers
28 views

Collection has not been initialized(async)

I am trying to create with search(display templates). To return a list with only the followers. The following error is throwing when running: "Error: The collection has not been initialized. It ...
2
votes
0answers
43 views

SharePoint 2013 - Add-in - JSOM - Create SharePoint Group

I am trying to create a SharePoint Group in a SharePoint Add-in, which has Full Control over the site collection, using JSOM. Here is my code: function createGroup(groupName) { var ...
2
votes
2answers
258 views

run external Script before CSR code is executed

How can I load a script file before the CSR is executing? Microsoft says to https://code.msdn.microsoft.com/office/Client-side-rendering-code-b2eedf92 (function () { // jQuery library is required ...
1
vote
0answers
42 views

slider.js sharepoint 2010 configuration

I am using slider.js (followed this : http://summit7systems.com/a-simple-jquery-content-slider-for-sharepoint-200720102013-and-o365/). It all works fine, but if I wanted the slides to go from 0 1 2 3 ...
1
vote
2answers
54 views

use CSOM for the GetListAndView WebService for multiple lists/views

I know how to use lists.asmx?op=GetListAndView to get list and view details. I'm trying to do the same using CSOM. And, to keep it efficient, I wanted to make one call for multiple lists/views. But ...
1
vote
0answers
31 views

SP2010 - How to stop a Jscript filtering folders

I'm on SP2010, managed by my company so unfortunately no access to server and can't add additional web parts. I previously had the need to build an A to Z filter in a library. I have used a Jscript ...
0
votes
1answer
36 views

SharePoint Online, Stripped down .aspx, requirements to access _spPageContextInfo

What is requirements to access the _spPageContextInfo object from a blank .aspx page or .html in SharePoint Online? I have a document library with a blank aspx-page and in that page I would like to ...
1
vote
0answers
27 views

SharePoint 2010 how to duplicate add document link on sharepoint list

How to duplicate add document link on a SharePoint list? I am planning to put the "add document" link both on the top and bottom of the SharePoint list as well as the "navigation link" next and ...
0
votes
0answers
28 views

Hide Droplist with Jquery

I am working with Sharepoint 2010, i am trying to hide different fields according to role of the current user. My code only works with normal text fields, but it doesn't work with drop list, so i ...
2
votes
1answer
97 views

how can i override the onclick event for events/items on a Calendar using JavaScript?

Right now when you click on an event on the calendar it selects it. I want to override that behavior. I can't seem to find what event to override. Any ideas? I know I can iterate through each ...
0
votes
0answers
38 views

SharePoint 2010 - How to add “Title” attribtue with Created By value for each reserved item in FreeBusy field table?

I searched hours on the internet, there is very few information. Reservations content type is enabled in a Calendar list in SP2010 (e.g. image1). Do you guys have any ideas/directions on how to show ...
2
votes
4answers
429 views

Create/ Delete file from SharePoint javascript without SP libraries

I'm developing an HTML page, which shows files from a certain dictionary from ths Sharepoint. In this page I want to add an option to create a new file to the dictionary. I didn't find a way to do ...
2
votes
1answer
64 views

Javascript object model says load succeeded, but object is empty?

I've got a pretty weird issue going on on a clients SharePoint 2013 environment. We're using some JSOM javascript code to retrieve details from a web. Here is a snippet of the code: function ...
1
vote
1answer
148 views

JSLink and REST API issue with async

I am trying to use REST API inside JS Link. SPClientTemplates.TemplateManager.RegisterTemplateOverrides(OverrideFieldContext); function OverrideFieldContext(ctx) { var groupingName = ...
1
vote
0answers
162 views

Rename Sharepoint 2013 document library file name using REST and JS

I am new to Sharepoint. I have a list of files in a document library. Files are placed within the year folder, followed by the sub-folder of month and the day wise sub-folders. I have a list of ...
2
votes
2answers
64 views

Best way to create a multiple item submit form

I'm looking for a way to create a form in SharePoint 2013 which will allow me to submit multiple items into a list (each line as an individual record). So, for example, i'd have a form with inputs for ...
1
vote
2answers
82 views

Cross Domain REST Calls - Always 401 before 200 received

I am attempting to create a REST call across domains (we have different farms with different domains in our organization. I am not doing this through an app, but instead I am doing it via a CEWP ...
3
votes
1answer
208 views

need to click submit/publish button on ribbon via HTML button

I have one HTML button to to submit on one custom page layout. I want to to submit or publish this page on this HTML button click. I tried with binding it with ribbon button onclick using jquery. But ...
3
votes
2answers
259 views

Does Sharepoint 2013 really have a jquery conflict with $?

I have been working on SharePoint 2013 recently, and noticed that under variation sites, SharePoint 2013 has a java script file that defines a global variable called $ which overwrites the jquery $ ...
0
votes
2answers
270 views

Approve Task from Javascript

I have the List1 which creates a Task when an item is inserted. I have to approve this task via Javascript. I found some examples, one of these: var clientContext = new ...
7
votes
2answers
214 views

What are the Type.registerNamespace advantages over standard JavaScript methods?

Now I dive deeper into the world of .Net developers I notice more and more Microsoft ways of doing things unfamilair to me as a (once LiveScript) JavaScript developer. I see PnP and other blogs ...
1
vote
3answers
25 views

Same solution displays different links on different servers

I created a farm solution. One of the webparts retrieves data from internal rootsite. <script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script> In the test ...