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
0answers
40 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
76 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
50 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
52 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
17 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
160 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
84 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
63 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
33 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
47 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
200 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
24 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
46 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
42 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
66 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
15 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
32 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
77 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
107 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
181 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
142 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
16 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
52 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
36 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
32 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
78 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
40 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
46 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 ...
2
votes
1answer
85 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. ...
6
votes
1answer
180 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
45 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
27 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
18 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
112 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
104 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
86 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
92 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
74 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
28 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
69 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
84 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
24 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
31 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
58 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
40 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
143 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
40 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
54 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
79 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
25 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 ...