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
15 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
25 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
27 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
14 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
13 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
24 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?
1
vote
1answer
19 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
28 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
16 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
17 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 ...
0
votes
2answers
29 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
13 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
20 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
25 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
44 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
23 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
27 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" %> ...
0
votes
1answer
15 views

Upload new image in asset library in SharePoint Online

I am developing a SharePoint Hosted app for SharePoint Online. Now I wondered if there is a way to upload a new image file to the central asset library. I found several code snippets for C#, but my ...
0
votes
0answers
14 views

Adding a custom ribbon tab breaks grouping by function in sharepoint list

So, I found this tutorial online as to how to add a ribbon tab in sharepoint 2013. While it works, whenever I add an OOb library or list and use grouping in that list, the items cannot be expanded but ...
3
votes
2answers
69 views

Start Workflow using JavaScript or Ribbon Button

I'm using SharePoint 2010 Foundation. I've developed a SharePoint-Farm Solution and now I want start a SharePoint Workflow clicking a Ribbon Button. I know that with SharePoint Designer I can create ...
1
vote
2answers
42 views

Print only the used fields in Sharepoint using JavaScript

I need to print only the column that has been created by me. function retrieveFieldsOfListView(listTitle,viewName){ var context = new SP.ClientContext.get_current(); var web = ...
1
vote
0answers
19 views

SP13 - Finding all sites a group has access to

In SharePoint 2013 when you're looking at a group's page (the one that lists all of the members of the group) you can open the 'settings' menu and there's a choice to 'view group permissions'. This ...
0
votes
0answers
13 views

retrieving user name in Jquery datatable and caml query

Hi I am on SharePoint 2010 version , I have created a list with createdby, createdDate and Employee name as columns in it. I am having a text box and a button when I enter employee name and click ...
1
vote
2answers
35 views

Get file name from document library

I have a document library named DocLibrary. Inside that, I have created few folders. Each folder have 3 another folder. Inside that, I store the specific files. Example: DocLibrary > NF1> ...
0
votes
1answer
23 views

Refresh the data on the webpart without entire Page refresh

The data from the list is displayed on the page using content editor webpart as a scrolling text. The requirement is whenever the list is updated with new items, the data displayed on the page using ...
1
vote
1answer
46 views

SP.UI.ModalDialog undefined - Close SharePoint Modal dialog with javascript

I have created a modal dialog in SharePoint with the elements.xml. I use a SharePoint Hosted app. This is my CustomAction Definition: <CustomAction ...
0
votes
2answers
32 views

How set a people field with JavaScript

With SPServices I'm getting information from a list A that information contains in one of its columns a people field. In the form B I need to copy that person coming from the list A in one of the ...
0
votes
2answers
41 views

Passing the Sharepoint Logged in user credentials to a REST API Call

I am having issues passing the current logged in user's credentials in to a REST API call. Here is the scenario: I have a SP 2010 hosted site that has a web part that makes a REST API call to ...
1
vote
1answer
26 views

Disabled custom action tooltip

Some custom actions in SharePoint display an additional message with possible reason of the action being disabled. Is there a simple way of adding such a message only when the action is disabled (for ...
0
votes
0answers
35 views

Create links to change between calendar views

The code on this question, Using Javascript to change the view on a calendar web part, allows you to create links to change between month, week and day links. I am trying to do something similar, but ...
0
votes
1answer
21 views

How do I send data to a list form from a SharePoint page

I have a page that displays data from several lists and has links to a list form which open in a modal popup. I need to send some data to the form to be displayed on the form. Is there a way I can do ...
0
votes
2answers
45 views

How to get major & minor version limit of list/library using javascript?

How to get Major Limit of Sharepoint List and both Major & Minor Limit of Sharepoint Library using javascript ?
0
votes
0answers
10 views

Alter pathname to include query parameter [migrated]

I need to alter the following line of javascript: whoproxy += 'proxying as '+proxyingname+'.&#160;'+selectproxy+'&#160;<span ...
0
votes
2answers
68 views

Can you populate a dropdown choice field with jquery and javascript?

I would like to use a radio choice field to determine the values that will be populated in a dropdown choice field on a sharepoint list form. for example; Food Type (radio field) Options Meat ...
0
votes
2answers
18 views

Open form in a model window

I have this code that opens a form from an image button and I want the form to open modally. <a class="ms-addnew" id="idHomePageNewItem" ...
0
votes
1answer
44 views

Get document from Document Library using Javascript

I am trying to get a document from document library.I am getting the file but I can't get its binary value. $.ajax({ url: fileUrl, binaryStringResponseBody: true, headers: { ...
0
votes
0answers
26 views

How to add a reference to a javascript file in a custom action for a provider hosted app?

I have a custom ribbon button in my app where I am trying to add logic to enable/disable the button based on whether or not the selected items are records. I am able to get the EnabledScript attribute ...
0
votes
2answers
25 views

Javascript in script editor not always rendered

I'm having a strange problem with Javascript and SharePoint Online. I've created a page that contains a script editor webpart with some JavaScript code (calls a few REST services to show a list of ...
0
votes
2answers
41 views

How to host static html page and override all existing Javascript on SP2013?

I have a flipbook (generated by http://fliphtml5.com/). It contains a static html page with a lot of javascript and css files. Our users would like to host it on SharePoint site. The file can be read ...
0
votes
2answers
34 views

Schedule a workflow to run everyday

I want a workflow to run each day at 2.00 AM. Is there a way to achieve this? I found many posts but didn't work.
1
vote
1answer
43 views

how to display a contacts list in accordion view?

I want to display a contacts list in SharePoint 2013 as accordion. I tried to use the code from ...
1
vote
4answers
70 views

change value in dropdown menu sharepoint

I have a dropdown box name Status added in sharepoint page which have option (choose.. , In progress, Closed). Where Choose.. is bydefault value. When I open the page the value Choose.. should get ...
1
vote
4answers
69 views

Call JavaScript function after blog/page fully loaded?

using SharePoint 2013 I've added a blog post. This blog post requires me to run some JavaScript after it has been loaded. I am also using jQuery, so I tried the standard $(myInitFunction) to no avail ...
0
votes
2answers
31 views

Runtime error javascript in Visual Studio

Lately I get this error (see pic), however if I click continue everything works perfectly and the value is assigned correctly to variable xAppWebUrl. In another script I have similar code that runs ...
1
vote
0answers
18 views

Can I programmatically access the values and modified dates for appended column entries?

I have a Projects list with a multi-line text column named Progress Update set to "Append" to create a record of updates. This appended Progress Update column saves a "blank" value when a list item ...
0
votes
2answers
54 views

How to delete list attachments using javascript

How to delete list attachments using javascript? I have searched for same thing, but so many results are coming in which they are suggesting by using client object model using C# code. I didn't find ...
0
votes
1answer
26 views

Logout in Mozilla and chrome not working

I have configured fba in my site using thinktecture. When I click sign out or sign in as different user, sharepoint redirects me to following page: ...