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
38 views

How to display a message is SP2013 with Javascript? [closed]

I have the following code and what I want is to show a message: function startTimer(duration, display) { var timer = duration, minutes, seconds; setInterval(function () { minutes = ...
0
votes
1answer
40 views

Edit Calculated Column Formula with jQuery or javascript REST JSOM

Is it possible to insert save a formula into a column within a list in list view using jQuery or JavaScript?
1
vote
0answers
76 views

Can you connect Active Directory to SharePoint via JavaScript/ SPServices/ or SOAP?

I am trying to connect a AD to a SharePoint 2013 list form so that the SharePoint form is filled in automatically with data from the Active Directory (i.e. contact information). Is this possible? I ...
0
votes
1answer
21 views

Download the Monent.js to the SharePoint server

Could some on guide me as how to download the Monent.js to the SharePoint server? I know that I can reference it, using <script ...
0
votes
0answers
92 views

Javascript window.location.href not working

I am trying to redirect to another site (say www.google.com) from a SharePoint site. I tried using window.location.href and window.location.replace but it doesn't work. It adds the URL to current ...
0
votes
0answers
19 views

Re-direct New Form submission in SP 2013

I am trying to redirect a 'NewForm' submission to another page (not the default list view which is normal behavior). Code like what I've pasted below has worked in the past in SharePoint 2010. It is ...
0
votes
2answers
65 views

Looking for count down clock in CEWP using html/jquery [duplicate]

I am looking to insert a count down clock in content editor web part using html / jQuery. Did any one ever do this? I am unable to figure out how to start as am not a pro in scripting.
0
votes
0answers
18 views

consuming html content of external web application into sharepoint masterpage

I could consume the content (html and css) of an asp.net application from another application with the following Jquery code(I used CORS) : $("#success").load("http://localhost:50710/ .round", ...
2
votes
3answers
139 views

how to get a value from a Sharepoint list with javascript

I have the following code: window.onload = function () { var setTime = // i dont know what to do here var fiveMinutes = 60 * setTime; display = document.querySelector('#timer2'); ...
0
votes
1answer
50 views

How to reference SharePoint list in external website?

I have an external website that is pretty much a form that interfaces with another enterprise software. One of the requirements of the fields in the form is to provide a location. We have the list of ...
0
votes
2answers
45 views

Sharepoint 2013 Custom List Calculate difference between Today and Column Value

I'm attempting to use update a Column [Days Since Last Contact] by calculating the different between =TODAY() and a Column [Date of Last Contact]. I've been trying to use [Day Since Last Contact] as ...
0
votes
0answers
12 views

Input in SP custom list if radioButton is checked

I have a radioButton, rdbMale . If rdbMale is checked, I want Male to appear in SP custom list. I have an usual column (Single line of text) in my custom list. <input type="radio" name="male" ...
1
vote
1answer
41 views

Caml Query not applying to my list requests

I have a SharePoint Application that needs to data from lists to be inserted into elements. Here is the JavaScript: Collection.List.DropDown = function (listTitle, element) { //listTitle = ...
0
votes
1answer
51 views

executeQueryAsync synchronously in each loop for sharepoint javascript model

I am performing looping in javascript for sharepoint. I want it to perform synchronously, means only after first data execution is done it should start with second. If first data execution is ...
0
votes
0answers
46 views

Access SharePoint using Claims Based Authentication with Javascript

I'm making a slideshow with all the news and all the information that I display is the news that is already on Sharepoint but I need to read it somehow. All I'm asking for is a good example code or a ...
1
vote
1answer
83 views

How to use JSOM/CSOM in SharePoint 2010 to get information about the current user like department, title, manager and phone number

I've seen how to get information about the current user using CSOM/JSOM from Get current user in Client Object Model with javascript? but I can't figure out how to get other properties like: ...
0
votes
2answers
68 views

Calculating 2 weeks forward from a day, using a marker day

I am trying to code the date of the Thursday which falls two weeks after a given date. It is more complex then just adding 14 days to a given date. This is because if the first Wednesday after a ...
5
votes
2answers
152 views

Hide options from ECB Menu in SharePoint 2013 Library

I have added a document in a document library. I am trying to hide an option from ECB Menu How do you hide any options from ECB Menu? Update: Each item has a column "x" with different values. So, ...
0
votes
0answers
84 views

JS Link and CSR: How to use Default sorting/filtering and override header

I'm using JSLink to customize list views. I actually override the complete view,. Header, body and footer (because the default HTML code of Sharepoint is quite a mess and quite impossible to style via ...
4
votes
0answers
83 views

Bundle SharePoint JavaScript files inside SharePoint hosted app

We have a SharePoint hosted app. This app require some scripts from SharePoint; MicrosoftAjax.js, init.js, sp.runtime.js, sp.js, sp.taxonomy.js and sp.workflowservices.js. We load all these from ...
0
votes
0answers
19 views

SharePoint datasheet view not working after adding angular app

I Implemented a custom button on my SharePoint page to toggle listview webpart view from normal view and quickedit view. but I'm getting the following error after I add angular app.
0
votes
1answer
49 views

Set a FormField value in SharePoint

I currently have the following: <td width="400px" valign="top" class="ms-formbody"> <SharePoint:FormField runat="server" id="ff16{$Pos}" ControlMode="New" FieldName="Dept_x0020_Name" ...
1
vote
0answers
96 views

Remove list item permissions by role type using JSOM

I'm looking for a good way to remove all list item permissions on a certain list item of a specific role type using the JavaScript object model. With ...
0
votes
1answer
21 views

Web Crawler for SharePoint 2013 with JavaScript

I'm kind of a SharePoint noobie still, but have been tasked with creating a "web crawler" to search through a certain site url within SharePoint. So, given the url, I want to output the pages nested ...
2
votes
1answer
46 views

Sharepoint 2013 - show edit to admin only

I hope this has not been asked before (I did a few search's on here first). I need to be able to only show the Blue & Grey SharePoint Bars to admins - for all other users I want to be able to ...
1
vote
0answers
32 views

Why getElementsByTagName() return an empty collection?

I'm using javascript inside the console of Firefox and this method does not work as well as 'getElementsByClassName()'. I specifically added class attribute to my tags in order to access. Could ...
0
votes
0answers
35 views

multiple updates on same sharepoint list item from CSOM( javascript)

I have a list with a field Status(dropdown with some values), I am using default save functions javascript. The status field is grayed out to the users. In presave javascript function I want to ...
1
vote
0answers
37 views

Javascript or jquery Gantt chart [closed]

I need to create a Gantt chart using javascript or jquery. Could any one please let me know how to achieve this? Title is represented by X-axis and Y-axis represents Start date and end date.
0
votes
3answers
67 views

How to bind SharePoint:FormField with data coming from a string array on server side?

<SharePoint:FormField runat="server" ID="field_Domain" ControlMode="New" FieldName="Domain"/> I want to fill the formfield ...
1
vote
1answer
51 views

Access List items from two Lists

I need to show values from two different lists.There will be 2 column from List1 and another two columns from List2. Two lists are connected with look up column. Please help with JavaScript code for ...
0
votes
0answers
33 views

How to create common javascript file for multiple views/pages?

I am working on MVC project where I have saveral number of views. In all the views I have pages like Index.cshtml, AddEdit.cshtml, ViewDetails.cshtml etc. Currently each of one these view has ...
1
vote
4answers
90 views

403 Error on REST/JSOM call within a form in SharePoint 2013

I try to update a ListItem in a (foreign) SiteCollection wihtin an edit form by CSOM. But I can't get it to work without getting a 403 error: cs.updateListItem = function(siteURL, listNameSTR, ...
0
votes
0answers
26 views

Connect to sharepoint web service with javascript

http://appsrv/pfa/_api/ProjectData/Projects?$select=ProjectName,ProjectStartDate,ProjectPercentCompleted This is the link that after you enter username and password return XML data, I need to access ...
1
vote
1answer
65 views

How to get all items in SC with a specific content type using JavaScript

There are five custom lists in a site collection, all have same content type. I would like to get all items from those five lists using JavaScript. Is there a way to get all items from all lists ...
1
vote
1answer
31 views

Retrieving Constants from Server Side using Javascript

Is there a way to retrieve a constant from a Constants.cs file by using javascript? I can retrieve the my constant in my ascx page using Constants.Lists.DisplayName.MyList. I was wondering if I can ...
1
vote
1answer
96 views

Why doesn't CAML Query Get Data from a Column Name?

I have a custom list which I am pulling data from using JavaScript. However for some reason it does not pick up two columns when I call them by their name. I have to use ...
0
votes
0answers
44 views

Sum up Values from Sharepoint List column

I have 4 columns with choice field type. Each column has 1,2,3,4,5 value . Now if I select value from each column and submit it should add up those number. If some other user login and do the same ...
1
vote
0answers
33 views

Problem loading panorama in SharePoint - redirect for image files [closed]

We have a panorama made with krpano that we would like to show in our SharePoint site. All the files and images have been uploaded, but when trying to run the panorama we get loading errors for the ...
2
votes
2answers
83 views

Getting the URL of second last visited page in SharePoint

I am able to get the previous page URL, but also I need to get the URL of the second last visited page. I have used the below code.. <script> _spBodyOnLoadFunctionNames.push("GetUrl"); ...
2
votes
1answer
24 views

SharePoint Content Search

I have a list with some fields. I want to create a search page for that List in which every keyword matching the data for any list item will be returned. How can I search content in SharePoint List ...
0
votes
0answers
76 views

Javascript to add an “Add new Item” to Lookup fields on an Edit Form is not working in Chrome and Mozilla

The below javascript which creates a link next to a lookup field on a list NewForm or EditForm. It is working fine in IE and when lookup has more than 20 + values it is not working in Chrome as the ...
1
vote
0answers
31 views

plz correct my validation code [closed]

<html> <head> <script type="text/javascript"> function validate() { var product1 = document.getElementById("product").value; var description1 = ...
1
vote
0answers
24 views

Why isn't CAML Query Getting Data from a Column?

I have a custom list which I am pulling data from using JavaScript. However for some reason it does not pick up two columns when I call them by their name. I have to use ...
1
vote
0answers
39 views

Gridview search filter with paging

I've a grid view and I want to add search filter on it. This code works fine if the grid view did not have the paging in it. It is not working on paging. Please help me in below mentioned code. I want ...
2
votes
1answer
144 views

Loading javascript after all the rest calls are finished on the sharepoint page

Environment: SP 2013 on prem, team site with publishing feature enabled I want to call my javascript after the complete page is loaded. The page has some webparts that have some rest calls. So I want ...
1
vote
5answers
244 views

How to get People Picker ID using Javascript

Hi is there any way to get the People Picker value using Jquery / JavaScript? Currently we use title tag to get the id of our input fields values but people picker has only one generic title field ...
1
vote
3answers
112 views

How do I format a Date for my local region in a customised SharePoint Display Template

How do I format a date in a customised search Display Template to show the date in my Region rather than UTC. I use the following XSL in Content Query Web Parts to present the date in my timezone, ...
2
votes
1answer
59 views

Customizing item_CommonHoverPanel_Actions display template

I customized the item_CommonHoverPanel_Actions display template and added custom link to it. Whenever user clicks on the link he/she is redirected to another page. What i am trying to do now is to ...
0
votes
0answers
29 views

Node.js - SignIn to Sharepoint

After installation of Node.js on my SharePoint 2013 Enterprise Server, I get following error, when I want to connect to SP: I am using following code (main.js): var SP = require('sharepoint'), ...
1
vote
0answers
36 views

Get the Checkbox checked status on submit button click in SP 2010 list form

Am using checkbox multichoice field in my newform.aspx and in presaveaction call am doing the below code: function PreSaveAction() { var dt3; var dt4; ...