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
2answers
595 views

clienttemplates.js is raising errors on Google chrome

When browsing SharePoint 2013 using google chrome I am getting following error:- ReferenceError: Strings is not definedReferenceError: Strings is not defined and the Chrome Developer tools ...
2
votes
2answers
18 views

CSR Template PercentComplete with skale 10 times blocks range 10,20,30,40,50,60,70,80,90,100 only

I created new PercentComplete bar but how can I set percentage to only 10,20,30,40,50,60,70,80,90,100 alowed values? function percentCompleteEditFiledTemplate(ctx) { var formCtx = ...
0
votes
3answers
27 views

How can I create a column in SP list which represent current date?

How can I create a column in SharePoint 2013 which represent the current date. For example today is 02/09/2016 tomorrow should be 02/10/2016, 02/10/2016... and so on each day the date must be changed. ...
0
votes
0answers
25 views

SCRIPT1004: Expected ';' error in the browser

I am using this script to hide 'Edit' button from SharePoint ribbon on my custom webpart's ascx page and calling it in the page load: function hideEdit() { var edit = ...
0
votes
1answer
44 views

JSLink: Is it possible keep the default list view header with column headers for filtering?

I am rendering a view with JSLink. Rendering is fine but is it possible keep the default list view header with column headers for filtering? I have tried this code in my dev environment. Issues: ...
0
votes
0answers
24 views

Javascript popup

I am using the below code to create a pop for pages. When you right click and select print preview, the preview is of the page behind the pop up as well as the pop. Is it possible to just preview ...
1
vote
3answers
5k views

Trigger JavaScript on Custom Action Ribbon/Menu Item

I have two custom actions that are currently deployed to a SharePoint 2013 Forms Library. They are working perfectly fine with the exception of a less than favorable method. What happens now is that ...
9
votes
1answer
20k views

ExecuteOrDelayUntilScriptLoaded with sp.js when in debug mode Object Expected

I currently have a JavaScript file that gets loaded in my SharePoint pages. jQuery(document).ready(function() { ExecuteOrDelayUntilScriptLoaded(myfunction(), "sp.js"); }); myfunction = function(){ ...
0
votes
1answer
2k views

Uncaught TypeError: Cannot read property 'toString' of undefined

I have implemented the jQuery UI autocomplete functionality on a input field using JSLink. It works like a charm when I test it using Internet Explorer 9, 10, 11 and Chrome. Some users are however ...
0
votes
1answer
25 views

add/remove list UI - what does the data look like?

I have to retrieve data from a SP list using javascript. This list has got a field which is being set using an "add/remove list" (with add and remove buttons in between two listboxes, you know).. ...
3
votes
1answer
37 views

How to get selected user/group information on Edit Permissions page (editprms.aspx) using Javascript?

When manger would like to edit the permission level he will select the user or group from user.aspx for editing their permission level using Edit Permission button. It will show edit permission page ...
1
vote
1answer
618 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
0
votes
1answer
17 views

How to apply a Date Filter on a list with JS

I have a Date Filter webpart connected to a List on page. I am setting the default value of the list with JQuery (it sets that value to the next Wednesday). Here's a jfiddle showing how we are ...
3
votes
1answer
3k views

Getting Version History and What Field has Changed

I am using the GetVersionCollection to get the history information from my list. This seems to be working fine; however, what I need to do is get the version history of the individual item which has ...
0
votes
1answer
1k views

Hover effect over an image in SharePoint 2010

I would like to add a kind of hover effect over an image. My source code in JavaScript looks like the following: _spBodyOnLoadFunctionNames.push("color"); function color(){ var $th = ...
0
votes
1answer
685 views

SPService GetListItems with CAML : can't get the example to work with status giving error

I am new to SPServices and trying start with example GetListItems. Below is my code $(document).ready(function() { GetTasks(); }); function GetTasks() { var method = "GetListItems"; ...
0
votes
1answer
38 views

calculated column javascript css cewp

Embedding javascript into a Calculated column works well, such as in this case Using HTML to recalculate calculated column However, where the following code ="function setTaskID(TR){" &" var ...
0
votes
0answers
13 views

Ending a Nintex workflow using JavaScript [on hold]

Hopefully someone has an answer out there and I am just unable to find it. My question is: Is there a way to end a Nintex workflow (on a list item) through the use of JavaScript? Points I've come ...
3
votes
1answer
50 views

Security Error while doing REST update on the SP list

I am trying to make update with the usage of REST but I got an error: -2130575251, Microsoft.SharePoint.SPException. The security validation for this page is invalid and might be corrupted. ...
4
votes
0answers
28 views

How to detect if a Project is in edit mode with JavaScript

I uploaded a javascript with a web part to my Project Server 2013 environment, and included the web part in one of the project's PDP, which contains the following code: var $puidElement = $("[GUID='" ...
1
vote
0answers
20 views

Change image name before uploading it to SharePoint library using Javascript or Jquery(Not Drop Zone control)

I would like to change the name of the image before uploading it to SharePoint document library. Below is the code i have written when an image is uploaded using HTML upload control. When the image is ...
4
votes
2answers
5k views

How to get ClientPeoplePicker value using javascript

can anyone please tell me, How to get ClientPeoplePicker value using javascript.?
0
votes
2answers
29 views

iFrame shows no scrollbars

I have a simple iFrame within a content editor where I want to add SP content (dynamically via JS): This is working fine... <iframe id="VersionHistoryFrame" src="http://www.test.de" width="400" ...
0
votes
1answer
588 views

The value of the property 'MSOTlPn_ShowToolPane2' is null or undefined, not a Function object

I have a problem with SharePoint 2010 and Internet Explorer 11. The following error message appears when I try to open the webpart menu. In Internet Explorer 8 the wepart menu works as expected: ...
1
vote
1answer
21 views

get user information by account name or e-mail for users that are not in the site's user list using javascript in 2010

I have either a user's e-mail address or account name. I need to get their other information like name, department and title. Everything I have read online only works if the user in question is in ...
0
votes
0answers
27 views

Authenticate users to SharePoint 2013 on primise from JavaScript

I am trying to connect my mobile app to on premise SharePoint 2013 server. I have followed some of the blogs on authenticating using JavaScript but all of them are explaining to connect SharePoint ...
0
votes
0answers
13 views

Display 'Related Item' Field in a Task 'Edit' Form

Is there any way to display 'Related Items' in a task edit form? It's already available in the display form, but when you switch to edit, it drops off. Ideas?
1
vote
2answers
2k views

Uncaught TypeError: undefined is not a function

I access my web in javascript code in SharePoint 2013. I'm using Jquery and KnockOutJS for my other functions. So I have added following urls above my code. <script type="text/javascript" ...
10
votes
3answers
713 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: ...
1
vote
1answer
1k views

CRUD Tasks using Javascript via REST OData

I've looked this post to build CRUD process using JavaScript via REST OData. I've have managed it for Risks and Issues list. But, I haven't succeeded for Tasks item. What's the difference between ...
0
votes
0answers
17 views

c# WebBrowser ignores InvokeScript if there is a Navigate after [closed]

I am completely lost with my code in c# using WebBrowser. I need to go to a website, log using a digital certification, and download some files. If my code is simply: WebBrowser wb = new ...
0
votes
0answers
8 views

Refreshing a lookup field in modal edit form via client side javascript

I have a list (list "Project") that on edit of a item opens a modal dialog for editing (editProject.aspx) The Project item has a lookup field "Document links" which points to a custom sharepoint list ...
1
vote
1answer
20 views

Retrieve List/Library “Shared With” Users and Groups using Javascript

I can retrieve Shared With info from a SharePoint 2013 (On Premisses) List/Library (not an item) using Javascript? I thought it could be available through ...
0
votes
1answer
17 views

How to insert FavIcons to SharePoint list from different websites?

as you can probably read from the title, I want to populate a column in my SharePoint list with favicons from different websites depending on the url in the corresponding field entry. I would use ...
1
vote
3answers
1k views

Is it possible to change the visual style of a JSGrid row?

I am working on a SharePoint solution using the SharePoint JS Grid control to display data. What I'd like to do is to change the default style (mainly background color) of specific rows in the grid to ...
2
votes
1answer
26 views

SharePoint 2013 - How to query members/users of an Active Directory group?

I have written some JavaScript code to get all groups and their users with permissions to a SharePoint list. Beside SharePoint groups there are also AD groups with permissions. The Problem is, that I ...
0
votes
2answers
3k views

SP 2010 CSOM Javascript: serverRelativeUrl fails

I have a custom html and javascript file housed within a document library of a subsite: http://teamsite/project/testing%20site/shared%20documents/test.html and ...
0
votes
1answer
1k views

SharePoint Conditional Formatting without using Designer

I am trying to apply conditional formatting to my SharePoint list based on a few conditions. For example I have a column (Month Needed) that the user selects a date from a drop down list in the ...
0
votes
1answer
46 views

Upload JS file on asset library

We have a SharePoint 2013 enviroment were we are unable to upload JS file to a an asset library from client machine, while it work ok if we upload from inside the server. How can we resolve the ...
1
vote
1answer
28 views

use SP.UI.Dialog on page load without ExecuteOrDelayUntilScriptLoaded

I know I can do this: ExecuteOrDelayUntilScriptLoaded(function() { SP.UI.ModalDialog.showModalDialog(..) }, "sp.js"); But I want to call SP.UI.ModalDialog.showModalDialog as soon as the page ...
1
vote
2answers
45 views

Changing A Lists row color based on a number

So I have a calculated field in my List view that gives the number of days from the contract end date - current date. I wrote the following script to change the color of the row if less then 90 or ...
0
votes
1answer
12 views

Building a To-Do List with jQuery and Local Storage

Hi i am working on a project to do task list where every thing work fine but i am not able to store data in list in following link data is store in var data = ...
5
votes
7answers
12k views

Enforce Drag and Drop documents to apply metadata

We have implemented an issue management system in SharePoint 2013 which provisions a page for every issue added to a specific list. One of the Web Parts the automatically provisioned page contains ...
1
vote
0answers
16 views

CSR View Fields dynamic with Field names from View?

I try one CSR file for all views but they Views have not all the same columns Is it possible to make Fields in TemplateOverrides dynamic with the Fields names in current View? ...
2
votes
1answer
29 views

How can I see what list items are in what folder?

I have some code that shows me all the items (files and folders) in a document library, but everything appears on the same level. How can I see which items sit in which folders? Currently the output ...
0
votes
2answers
898 views

Forcing showModalDialog() when an item is clicked from a web part links list

We have a web part on a page that refers to a simple list with two fields: Title and URl. Obviously, this list is used by the end user to show links to various items (google, etc) on the web part in ...
0
votes
2answers
540 views

Create filtered list view in Calendar using JavaScript/JSOM

I am attempting to create a filtered list view in a Calendar. It is creating everything as appropriate, but not creating the filters. It believe it's my CAML. My goal is to filter by a choice column ...
0
votes
2answers
47 views

reference ctx.CurrentFieldSchema with 'this' unsafe in CSR code?

In how we must code examples on MSDN: https://code.msdn.microsoft.com/office/Client-side-rendering-code-0a786cdd I see var priority = ctx.CurrentItem[ctx.CurrentFieldSchema.Name]; Is it unsafe to ...
0
votes
1answer
79 views

where to put C# code and where to put Javascript code in .aspx form in SharePoint Designer

I'm newbie with sharepoint, struggling but finding my way. I've created a list and created a new form called NewFormRequest.aspx in SharePoint designer. I'm calling this form in the browser ...
0
votes
1answer
553 views

How to return multi-value fields via SharePoint Rest API?

After reviewing my results, I realized one of the sharepoint columns only returns one value. How do I get it to return each value from my Role Column? It should look like this: Title: FDA Program ...