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)

1
vote
1answer
36 views

Error when querying list/roleassignment in 2013 REST API - Need to know if a user can query a list/library

In sharepoint 2013, I need to check if a the current user, has access to a specific list, for that I'm using the following REST endpoint (using AJAX) ...
4
votes
0answers
40 views

How to create ContentType with FieldLinks using REST on O365

I'm trying to create a ContentType with FieldLinks using REST only (no SP.ClientContext) on SharePoint Online, but I'm not able to make it work. Creating ContentType by POSTing to ...
1
vote
0answers
21 views

ECMA executequery not fired

I'developped an apps for sharepoint online. This apps propose to diffuser uploaded document under all library subsite. In first i retrieve all sub site then load needed library and finally. I do some ...
3
votes
0answers
26 views

Getting back-end data and displaying it in the client

My SP Admin level is strong. My SP dev level is beginner. I know some JavaScript. What is the best method of bringing Server and Farm information from the back-end to the client-side? For example, ...
1
vote
1answer
19 views

Adding javascript and a webpart to page using app model

I want to create an app that will add some javascript and a web part to a page in SharePoint. The page is a list page and already exists (AllItems.aspx page in the document library). I just want to ...
1
vote
3answers
71 views

How to update multiple items in sharepoint list online using javascript

I want to update 4 items in the same time in my sharepoint custom list using Javascript. Im using a camlquery to get the item witch i want to update. Can anybody please help me and write a function to ...
1
vote
1answer
26 views

Get Department for current user using REST API (Javascript)

Is it possible to get the department of the current user using REST API (Javascript)?
3
votes
1answer
47 views

HTML5/JavaScript Form with Complex Field Types

I am developing a responsive Website on top of SharePoint using Angular and have a few list forms that I need to establish. For fields such as text and date via saving or updating against the REST ...
1
vote
0answers
31 views

Javascript Script Editor code not showing for non-admin users

I have added a script editor web part in SP 2013 to add the code below to place a status message at the top but it doesn't work for non-admin users. I can see it just fine logged in as the admin on ...
0
votes
1answer
15 views

Upload an html page to sharepoint

I"ve been working on an html code (1 page only) with functions (using Javascript and CSS) and it's all combined in one file named menpower.html. I want to upload this html page to my SharePoint, so ...
0
votes
0answers
18 views

Filtered lookup using SPServices

I have 3 lists: Schools, Interactions, Contacts In the new form for a Interaction item I have a lookup field displaying a long list of contacts, however I need to filter this list to only display ...
3
votes
2answers
41 views

Site Columns JSLink doesn't work in custom XSLTListViewWebPart

I have a site column (Status) that I've added JSLink to, that runs my custom JavaScript. This works fine on lists. The JavaScript changes the text to a colored image. I've then created a Visual Web ...
1
vote
1answer
31 views

Get AD user object GUID using Client Object Model in Sharepoint

I want to extract the objectguid corresponding to a username from the AD using javascript in Sharepoint. Is it possible? I can get some properties like the current username by using ...
0
votes
2answers
26 views

Get ID of current list object being displayed

I am looking at trying to run some code against a list object when a user is viewing it. (for example, when a user views an item to, on load, updating the item with a 'has been viewed' field to ...
1
vote
0answers
15 views

How to dynamically change the drawing path in Visio Web Access Web Part

I am wondering if there's any way to dynamically change the drawing shown by a visio web access web part. I have multiple drawings I want to show on a page based on what users click on the page. Any ...
0
votes
0answers
33 views

Rest API create personal site enque

I'm trying to provision My Site by utilizing SharePoint JSOM or REST API. The JSOM code snippet (below) gives System.UnauthorizedAccessException and REST call gives me a 401. The goal here is to ...
0
votes
1answer
34 views

How to combine 2 calenders from 2 different sharepoint online sites?

I've received the assignement to combine 2 calenders from 2 different sharepointonline sites. From what i researched, this is not possible with the out of the box overlay solution SharePoint has to ...
0
votes
1answer
38 views

Get selected list items from Sharepoint Web Part

I am making a web part that will be added to a list page, and I need to access the selected items in the list. I am trying to do this using the following method (mentioned here: Get selected item in ...
1
vote
0answers
13 views

Function call in selection event

I want to call the following function in a selection event function name calcDay(). var p = getList("Compulsory Leave"); When i put it inside the selection event function it generated error : p is ...
1
vote
2answers
74 views

JSLink, can it run when a choice dropdown changes?

I have an EditForm that I am using JSLink to run some javascript that gets the Content Type and then sets a field according to the Content Type. This works fine when the form loads, the trouble is ...
2
votes
1answer
33 views

Display 'Change Item Order' in REST API call in SharePoint 2010

I'm display the contents of a Links List (named QuickLinks) on a page. I want to display the links in the order defined by the 'Change Item Order' feature of the Links List. Any help would be ...
1
vote
1answer
23 views

Programmatically follow a site with JSOM but error message is a lie?

I try to follow a page with JavaScript Object Model. My solution is based on many examples in the web and should work... var siteActorInfo = new SP.Social.SocialActorInfo(); ...
0
votes
1answer
19 views

Show notification from list form on list view

I have a custom display/edit form for my list. After the form is submitted and the user is redirected back to list view, I want to show a notification that 'new item has been added' or 'changes were ...
0
votes
0answers
34 views

JSOM Office 365 upload Page Layouts to master page gallery

How to upload a page layout from Visual Studio to Master page gallery using a Sharepoint hosted app?
-2
votes
3answers
86 views

sharepoint 2013 get ID of a user

I am looking to figure out a way to get the ID of a user, given their name, so that I can use it in a call to /_layouts/15/userdisp?ID=n, where 'n' is the ID of the user to redirect the person who is ...
0
votes
1answer
9 views

Internal Field name not returning value

I am using an OOTB field entitled Email that does not seem to be working. I have a really simple code that on change of the field value a pop up will return that field value: ...
0
votes
1answer
24 views

How to set an enterprise keyword field with javascript

How could I set/change the value of an enterprise keyword field in a form using javascript?
0
votes
1answer
37 views

Sharepoint Newform Javascript variable scope

I have a javascript in custom list newform looks this <script type="text/javascript"> var kontivalue = 0; function PreSaveAction(){ belegnummer = ...
1
vote
1answer
35 views

How can I update a Site Column with the content of an array with javascript CSOM?

I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to ...
0
votes
0answers
6 views

Clear Authentication Cache

Is it possible to use code to place a button on a page which a user can click, basically signing them out of our SP environment, the developers hid the sign in as different user option and don't work ...
0
votes
0answers
21 views

Reading KPI Indicator Status list values using JavaScript Client Object Model

I am wondering if there is any way to read a KPI Status list items with their KPI status values using JavaScript. So far I was able to get to those items's regular fields like ID and Title using this ...
2
votes
0answers
43 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.
1
vote
2answers
43 views

How do I access data in SQL via Sharepoint 2013?

I'm not a SharePoint developer, but I have developed some small ASP/VB.net web pages. Basically, prior to using SharePoint, I have developed a basic portal that pulls data (VB.Net) and sends it to ...
0
votes
1answer
37 views

Bind dynamic data in angular JS ng-init

I am using angular js to display data. I have an example with static data to bind that. But i want to bind data dynamically so i got the data from javascript function but am not understanding how to ...
1
vote
2answers
69 views

JSLink Client-Side Rendering Not Functioning on Custom List

I tested out the use of JSlink on the homepage with a demo list & it worked fine. I then used the same JSLink on the Demo List itself but images did not render. Any ideas on what I'm missing? ...
0
votes
0answers
9 views

SP: Distinguish between form initialization partial reload [SP2013]

I have edited the "new Form" for a custom list to add some JavaScript code, where I preselect some initial values depending on the user. My problem is that the underlying event content type contains ...
0
votes
1answer
24 views

Get image from SharePoint by URL

I try to get an Image from SharePoint by using JavaScript code. I have the complete URL of the image which is stored in a SharePoint Assets Library. My app is SharePoint hosted. This code does not ...
0
votes
1answer
23 views

Replace a file which has a specific ID with another one

I want to replace a file with another one using JSOM, but preserving all other associated fields (like Author and other custom columns in the document library) How can I select the file I want to ...
0
votes
1answer
26 views

Not able to update src in <embed>

I used the below code in content editor to extract the query string and update the src of <embed>. <object><embed id="ExampleEmbed" src="somfile" height="850" width="850" ...
0
votes
1answer
20 views

SCRIPT5007: Unable to set property 'ListId' of undefined or null reference

I am working on an enterprise wiki site collection, now when the user edit the properties of the page he will be redirected to the following page :- so i wanted to hide all the fields except the ...
0
votes
2answers
25 views

Issues with hiding <tr> elements in sharepoint form using jquery

I'm running into issue trying to hide elements in my sharepoint NewForm. I've added the jquery script to my NewForm <script src="/SiteScripts/jquery-ui-1.8.24.min.js"></script> I have ...
0
votes
1answer
28 views

Change color of even row in the list for all pages SharePoint 2013

I add JavaScript to a wiki page which has a web-part of list. I want all even rows in the list display background color in green. There are 10 pages in this web-part. But the script just works for the ...
0
votes
0answers
53 views

List all site collections in SP Online

Is it possible to get list of site collections using JavaScript Object Model in SharePoint Online? I would like to display a list of Site Collections in left navigation. something like below. ...
4
votes
0answers
94 views

How to access a custom field of a list using REST

I'm trying to get information from a list in a custom SPField called "My Field" with the internal name "MyField" using this JavaScript code: $.ajax({ url: ...
0
votes
1answer
31 views

Set items while uploading a file in a document library

I am using JavaScript to upload a file in a document library, like this clientContext = new SP.ClientContext.get_current(); oWebsite = clientContext.get_web(); oList = ...
0
votes
1answer
23 views

Why do I use load AFTER these portions of code?

Let's take for example the code below: function createListItemProdus() { var clientContext = new SP.ClientContext.get_current(); var oList = ...
0
votes
1answer
13 views

Date value retrieved from an item keep on increasing every few seconds

I was trying to retrieve items from a SharePoint custom list called "Some Events" using JSOM. Title, Venue, EventDate were few fields I was retrieving. Every thing worked fine except EventDate. ...
1
vote
2answers
56 views

Sharepoint Read list items using Javascript

I wrote a query to Read list items and a specific column value like this var invoiceitemID = SPUtility.GetSPField('ID').GetValue(); var clientContext = new SP.ClientContext.get_current(); var oList = ...
0
votes
2answers
39 views

Upload file to document library using Javascript

I want to upload a word document to sharepoint document library using javascript (say for ex .Net site). How can i achieve this?
0
votes
2answers
34 views

Uncaught TypeError: Cannot read property 'setHours' of undefined

I want to calculate the total days of leave that can be apply in weekday. startDate & endDate value i take from their fields in format of (month/day/year) I have found the uncaught type error in ...