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
3answers
158 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
69 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
69 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
39 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
20 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
39 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
67 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
63 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
30 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
33 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
66 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
43 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
46 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
16 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
122 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
51 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
55 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
30 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
44 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
123 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
20 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
37 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
41 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
51 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
12 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
31 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
64 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
71 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
97 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
106 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
13 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
38 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
28 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
29 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
43 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
35 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
37 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
59 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. ...
5
votes
0answers
133 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
42 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
26 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
17 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
99 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
71 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
63 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 ...
2
votes
1answer
74 views

How to upload images to picture library using JavaScript?

I want to upload multiple images to picture library using JavaScript. I am building SharePoint hosted app. In which I have created a Picture Library in side Project Solution using Visual Studio and ...
1
vote
1answer
51 views

Using promises with executeQueryAsync results in error

I'm pulling information from an Excel spreadsheet and trying to check the rows against data from a SharePoint list to find duplicates. The executeQueryAsync() in the itemIsDuplicate() function is ...
0
votes
1answer
27 views

How to change default view of library using javascript or programatically?

I have a requirement where I have to change view based on users logged into the portal. If user belongs to guest view then view should be different and if he is logged in as admin a different view ...
0
votes
2answers
59 views

Hide field after checking if user is admin - deferred promise?

I am attempting to hide a field from a newform, but only if the user is not a site collection administrator and not assigned full control of the (sub)web currently on. I am not well experienced in ...
0
votes
1answer
67 views

Add Item to List on JSLink with jQuery

I have a JSLink on my Webpart Custom List, and I need to add an item before render a view. (function () { var overrideCtx = {}; overrideCtx.Templates = {}; ...