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
20 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
14 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
27 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
62 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
8 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
18 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
25 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
20 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
5 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
16 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
26 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
28 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
18 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
49 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
6 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
21 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
21 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
24 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
14 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
19 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
25 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
29 views

List all site collections in SP Online

Is it possible to get 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. >SC1 ...
4
votes
0answers
74 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
26 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
22 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
11 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
47 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
26 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
25 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
27 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
23 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
19 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
33 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
31 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 = {}; ...
0
votes
0answers
16 views

How can I take some user input (html or markdown), transform with XSLT, and write the resulting file to a library?

Not looking for a solution here, just something to get me started in the right direction. I would like to create a page that takes some user input from a textbox (markdown would be cool, but HTML is ...
0
votes
1answer
14 views

Calculated column to find due date

I need to create a calculated column that will read in the date from one column and compare it to today's date. The problem is the the date column is a dropdownlist with dates entered in the format of ...
0
votes
1answer
28 views

Deploy the same JS Link for multiple views across libraries

I need to use the js for all views in all libraries in a site. Is there a way to deploy this in one hit rather than editing each view individually?
2
votes
1answer
22 views

Is there any api for Microsoft Global Address list?

I would like to get the name of a user from the global address list, using their email address. How can I do that?
1
vote
1answer
35 views

Refresh parent page after closing list item dialog

I'm trying to refresh the parent page of a list when closing the dialog of a list item. Is there a way to achieve this with javascript somehow? I inspected the button in the DOM and tried to write ...
0
votes
1answer
17 views

Remove line break from text in JavaScript (variable value from XSLT)

I need get a variable value from XSLT in search result in SharePoint 2010. But this value is muti-lines text. When I add this variable value in JavaScript, the JS code cannot work, because the line ...
0
votes
1answer
20 views

Concatenating a javascript variable into a camlQuery

I have a caml query that I'm concatenating with a javascript variable of type string. It queries the column names 'Audience' and returns the first 3 ordered by the newest. The variable subsite gets ...
1
vote
2answers
35 views

Use javascript/jquery to see if items in list are due soon in Sharepoint 2013

I am trying to determine by date if an item is due. In my use case, my user will create an item with a date in the following format (MM/DD or 06/15). Now if the date the user chooses will fall in the ...
0
votes
1answer
18 views

Get link to image from asset library

I try to access an asset library in a SharePoint-Hosted App via the REST API. The app is hosted in SharePoint Online. I get the properties of the images (e.g. the title etc). But I do not find a ...
0
votes
2answers
22 views

Is it possible to call JS file in Event Receiver?

Is it possible to call JavaScript file in any of the events in event receiver in SharePoint 2013.
2
votes
1answer
26 views

Register CSR via Client object

Im trying to register a client side rendering script to a webpart using JS to do so. Im having a hard time finding examples on how to do this, is anyone able to help me out? Below is what i got ...
0
votes
2answers
31 views

Clientside PeoplePicker: How to not execute next line (JS) until all users are resolved

I'm using SharePoint Online (2013), but I'm rather new to SP and anything Microsoft. In my JavaScript, I'm programatically populating a client-side PeoplePicker and having the Picker resolve the new ...
1
vote
1answer
24 views

Difference between Publishing site and Team site while loading SP.JS

I would like to know what is the difference when loading SP.JS file in Publishing site and Team Site. SP.SOD.executeFunc('sp.runtime.js', 'SP.ClientContext', function () {}); ...
0
votes
2answers
49 views

javascript not getting data from sharepoint list

I tried the below code from MSDN function retrieveListItems() { var clientContext = new SP.ClientContext('http://www.vignesh.cloudappsportal.com'); var oList = ...
0
votes
0answers
25 views

Ajax call stopped working

I wrote a code to get userProfile from sharePonit in jquery/javascript. few days ago, i tune up my internet speed and the code simple, stop working. I got this conclusion after put a break point and ...
0
votes
1answer
29 views

How to display application web form in modal dialog?

I have the following code of application page formdem.aspx: <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> ...