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)

4
votes
0answers
86 views

Bundle SharePoint JavaScript files inside SharePoint hosted app

We have a SharePoint hosted app. This app require some scripts from SharePoint; MicrosoftAjax.js, init.js, sp.runtime.js, sp.js, sp.taxonomy.js and sp.workflowservices.js. We load all these from ...
3
votes
0answers
36 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 ...
3
votes
0answers
84 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: ...
3
votes
0answers
72 views

'Permission denied' javascript error on modal window opening in IE8

While opening any modal window (NewForm, EditForm, custom or OOTB) on a SharePoint list in Internet Explorer I get few SCRIPT70: Permission denied errors. This causes problem with saving the ...
3
votes
0answers
210 views

SharePoint Edit Mode Javascript error in edit mode

I am not able to edit the page from the browser. I used to change and edit webparts when suddenly in the edit mode everything looks like it is locked/stalled. When I open the debugger tool, I saw a ...
2
votes
0answers
32 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; ...
2
votes
0answers
21 views

SharePoint Workflow Subscription Service failed

I have one requirement to start the SP workflow through JavaScript. For this, i have wrote some lines of code to start the workflow.But I am getting a Subscription failed error due to undefined ...
2
votes
0answers
39 views

Starting List Item Workflow using Javascript on custom edit page

I have a custom edit page with some Javascript inserted using a CEWP. From this page I am calling a function to start a list item workflow on the current item being edited. I am using the following ...
2
votes
0answers
69 views

Sort ListView via Postback in JSLink file

I found out, that you can filter a list view in a JSLink File very easy by a postback: function filterList(ctx, filterField, filterValue){ __doPostBack(controlId, 'NotUTF8;__filter={' + ...
2
votes
0answers
41 views

Sharepoint Authentication via REST API

I would like to connect to Sharepoint via REST API and Javascript. Based on readings I've done, first you need to have Security Token, then you use this Security Token to get FedAuth cookies, ...
2
votes
0answers
42 views

Display image(preloaders) before content is loaded WebPart - SharePoint 2013

I'm using a plugin called lighslider and I notice it doesn't display the whole content on first load until I refresh. I have tried using 1. windows.load, 2. ExecuteOrDelayUntilScriptLoaded, 3. ...
2
votes
0answers
41 views

CSR - One function for every field in a View?

We all know how to define one template function for one field. SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ Templates: { Fields: { "[fieldname]": { ...
2
votes
0answers
26 views

How do I restore specific list item version using JavaScript?

How do I restore specific list item version using JavaScript? Is there any way to restore specific version of list item using JSOM or REST API in Share Point?
2
votes
0answers
31 views

What are the different ways to consume SharePoint REST using Javascript

I know of two ways, using ajax and using SP.RequestExecutor.js. Are there any other ways. Code snippet and information around performance will be appreciated.
2
votes
0answers
132 views

Copying attachments using JavaScript (JSOM or REST)

I've been able to copy documents in document libraries using the "CopyTo" method: https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FileCopyTo I'm not understanding how I can apply ...
2
votes
0answers
41 views

SharePoint look up value A (list number value) and hide Add New button if 2nd list count value B (list count) is equal or greater to value A

I have an InfoPath form displaying formation for a commuter sign up list called "Register Commute" I modified the Content Type Display Form and added a list called "Commuter Sign Up" which is ...
2
votes
0answers
63 views

How to create custom user profile properties using javascript?

Is there any way to create an user profile property using the sharepoint online javascript api? if not which is the correct way to provision custom user profile properties for an app Thanks
2
votes
0answers
48 views

How to exclude TaxonomyFieldControl from spell checker

I have a page layout with a couple of TaxonomyFieldControls on it. When I run the spell checker in the ribbon the taxonomy fields are getting flagged with spelling errors. I don't want the taxonomy ...
2
votes
0answers
188 views

unexpected response from server

I am using javascript to load data from list. But every now and then i get error Unexpected response from server Sometimes i get and sometimes i dont. I googled and someone suggested to free memory ...
2
votes
0answers
125 views

People Picker in sharepoint 2010 in Client Object model

I want to implement a people picker functionality in sharepoint 2010 with Client Object Model (JSOM), how to do it? Actually i have implementated in 2013 but the same code does not work on 2010.
2
votes
0answers
163 views

socialManager.isFollowed(socialActor) only returning 0 or false, but never true

Any ideas why I'm only getting 0 or false, but never true for result.get_value()? // Set IsFollowed correctly. var clientContext = SP.ClientContext.get_current(); var socialManager = new ...
2
votes
0answers
119 views

Multilevel Audience Targeted Global Navigation SP2013

Has anyone set up Multilevel Audience Targeted Global Navigation SP2013? If I use term set I am unable to set security otherwise cannot set multilevel?
2
votes
0answers
128 views

SP2013: Tabular view incompatible with JSLink checkboxes?

I'm using a JSLink file to replace a "Single line of text" column with a custom checkbox. For some reason, when "Allow individual item checkboxes" is enabled my checkbox won't work - I can't even ...
2
votes
0answers
367 views

Required Field Issue with SharePoint 2010 December 2013 CU

I installed SP2 a couple of weeks ago to fix the issues with my XSLT Compiles timing oot (Which was a Bug introduced in SP1). Things seemed fine, but then a few days later we noticed that workflows ...
2
votes
0answers
346 views

SharePoint InputFormTextBox returns javascript error while changing its position

I have created one aspx page for implementing the edit comments of the form. For this I am using the SharePoint InputFormTextBox control. I have a total of 4 Divs each containing one InputFormTextBox, ...
2
votes
0answers
29 views

Instrumenting search term in SharePoint2010

I know SharePoint2013 can capture this data better but in 2010, i am trying to capture exactly what terms people are searching for. I have analytics logic that i can call as javascript. My search ...
2
votes
0answers
586 views

Install an app from the appCatalog using javascript CSOM

I'm trying to install an app in a site from the AppCatalog using the javascript CSOM I get the apps from the App Catalog using req.apps = SP.AppCatalog.getAppInstances(clientContext, oWebsite); I ...
2
votes
0answers
966 views

How to add the standard sharepoint list item context menu?

we have written a webpart that outputs titles of list items. We now want to add to each of those items the standard flyout menu (see the picture) below, but don't know how so far. Can you help us out ...
2
votes
0answers
975 views

Filtering SharePoint list items that have multiple values using jQuery

I have a SharePoint list that contains multiple columns of information. There’s a Category column that’s a look up to another list called ‘Category’. This is to produce unique ID’s for each of those ...
2
votes
0answers
105 views

changing language on application page

I am using following code to change the language of HTML form on application page: <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> ...
2
votes
0answers
687 views

Programatically creating Discussion List Posts - and replying to them from Outlook

We are Programatically creating a Discussion List Post/Topic (using JavaScript) based on an entry in a custom list. The idea is to synchronize this Discussion List with Outlook. That does happen ...
1
vote
0answers
6 views

Correct usage of getListItemChangesSinceToken() in JavaScript

I'm working on a Sharepoint hosted App, that accesses List Data from the Hostweb as I outlined here: EventListener for List changes in Sharepoint Hosted app I want to use the ...
1
vote
0answers
21 views

Change image name before uploading it to SharePoint library using Javascript or Jquery(Not Drop Zone control)

I would like to change the name of the image before uploading it to SharePoint document library. Below is the code i have written when an image is uploaded using HTML upload control. When the image is ...
1
vote
0answers
17 views

CSR View Fields dynamic with Field names from View?

I try one CSR file for all views but they Views have not all the same columns Is it possible to make Fields in TemplateOverrides dynamic with the Fields names in current View? ...
1
vote
0answers
19 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 ...
1
vote
0answers
26 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 ...
1
vote
0answers
24 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 ...
1
vote
0answers
25 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 ...
1
vote
0answers
19 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 ...
1
vote
0answers
23 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
0answers
29 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 ...
1
vote
0answers
19 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 ...
1
vote
0answers
45 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 ...
1
vote
0answers
17 views

unable to use getElementsByTagNameNS with a JavaScript SOAP 1.2 call to lists.asmx

For reasons I do not understand, even though the call is successful and I get data back, I cannot retrieve nodes using getElementsByTagNameNS on xhr.responseXML when using SOAP 1.2 calls. Hopefully ...
1
vote
0answers
22 views

How to put onload events on SharePoint 2013 scriptlinks?

In my page layout, I want to load a javascript file and put a onload event on it like <script onload="console.log(this)" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> ...
1
vote
0answers
81 views

Can you connect Active Directory to SharePoint via JavaScript/ SPServices/ or SOAP?

I am trying to connect a AD to a SharePoint 2013 list form so that the SharePoint form is filled in automatically with data from the Active Directory (i.e. contact information). Is this possible? I ...
1
vote
0answers
103 views

Remove list item permissions by role type using JSOM

I'm looking for a good way to remove all list item permissions on a certain list item of a specific role type using the JavaScript object model. With ...
1
vote
0answers
32 views

Why getElementsByTagName() return an empty collection?

I'm using javascript inside the console of Firefox and this method does not work as well as 'getElementsByClassName()'. I specifically added class attribute to my tags in order to access. Could ...
1
vote
0answers
26 views

Why isn't CAML Query Getting Data from a Column?

I have a custom list which I am pulling data from using JavaScript. However for some reason it does not pick up two columns when I call them by their name. I have to use ...
1
vote
0answers
42 views

Gridview search filter with paging

I've a grid view and I want to add search filter on it. This code works fine if the grid view did not have the paging in it. It is not working on paging. Please help me in below mentioned code. I want ...