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)

0
votes
0answers
65 views

SP.UI.ModalDialog.showModalDialog(options).I deployed to ClientWebPart.aspx i am getting error

I deployed to sharepoint office 365 ClientWebPart.aspx i am getting error Uncaught ReferenceError: RegisterModuleInit is not defined and Cannot read property 'execute' of undefined.the sharepoint ...
0
votes
0answers
65 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
3answers
56 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
39 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 ...
0
votes
1answer
35 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).. ...
1
vote
2answers
165 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
1answer
46 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 ...
4
votes
2answers
59 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
26 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 ...
0
votes
2answers
50 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" ...
3
votes
1answer
57 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 ...
2
votes
0answers
45 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?
0
votes
0answers
15 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
0answers
72 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 ...
2
votes
1answer
52 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 ...
2
votes
1answer
171 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 ...
2
votes
1answer
31 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
1answer
25 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 = ...
1
vote
1answer
122 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 ...
2
votes
3answers
103 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 ...
1
vote
1answer
59 views

CSR View Fields dynamic with Field names from View?

I try one CSR file for all views but the views have not all the same columns Is it possible to make the Fields in TemplateOverrides dynamic with the Field names from the current View? ...
2
votes
1answer
35 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
0answers
31 views

Sharepoint & Javascript: Handling Access Denied Error with Open In Windows Explorer. Catch Always Executing

So I am trying to handle an error when I attempt to open a folder location in windows explorer from SharePoint. If the website is not in your trusted sites while in IE the browser will throw an Access ...
0
votes
2answers
60 views

Add list item using JavaScript request failed

I am trying to add a folder to a library on my site, however I am finding it extremely difficult to complete such a simple task. The function executes properly (no errors or exceptions) however the ...
0
votes
1answer
32 views

Join 3 lists initiating the join from the middle list

I need to join 3 Lists, but i have no access to the on-prem sharepoint to test my idea right now. So I hope anybody can tell me, if it's possible. I have Lists A, B and C. LookupFields are connected ...
0
votes
0answers
18 views

Easy Tabs in SharePoint 2010 & preservation of easy tabs for SharePoint 2013

I am looking into ways to implement easy tabs for the display of a master glossary for my team. I have a code but I am not sure where to put it either in the content editor web part or in the general ...
1
vote
0answers
34 views

Trouble uploading file to Document library using REST api and JSOM

So I have been trying for the last day or so to get code right to upload a file to a newly created document library based off a custom template. Based on my research I know I am getting all of the ...
0
votes
2answers
107 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
39 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
1answer
47 views

404 Missing jQuery in _layouts folder

I have been stuck for a while trying to find out what exactly the _layouts folder does for SharePoint and why it may be causing any script I write and attempt to deploy on the site to not work. They ...
1
vote
0answers
54 views

Custom Action not showing on Site Settings pages

I have a little (crude) javascript function that should add a javascript file to every page on my site using custom actions (including the subsites via a recursive function). It seems to work well on ...
3
votes
0answers
65 views

SP's JavaScript function to create pagination

SharePoint 2013 here. I need to create a pagination of results I get from an external web service. I want to use the look and feel of SharePoints pagination: Ideally I could call SharePoint's ...
1
vote
0answers
26 views

Accessing JavaScript libraries for basic tasks

I ran into an error while trying to gain access to the required libraries for JavaScript development. I copied this code straight from Microsoft's documentation, however when it is executed on my ...
3
votes
1answer
142 views

SP.Taxonomy.js TypeError: b.get_path is not a function

I'm trying to display the terms of a site but I can't create a instance of TermSession object. context = SP.ClientContext.get_current(); var taxonomySession = ...
1
vote
1answer
51 views

Modal Dialog: How to Disable Redirect on Save

I have a wiki page with a link on it which when clicked opens a modal dialog to a document set's new form page. When the Cancel button on the modal dialog is clicked, the dialog closes, as expected. ...
1
vote
2answers
45 views

EventListener for List changes in Sharepoint Hosted app

I'm developing a sharepoint hosted Add-in, which should react to a change of a list field of a list in the hostweb. I need some kind of EventListener for a list field. For example: List field Gets ...
0
votes
1answer
108 views

Adding List view web part to a page using javascript

In a page, I need to add a list view web part when the page is loaded. Is it possible using javascript? Actual situation is that a list has a column States. It can have multiple values. So in ...
0
votes
0answers
33 views

Sharepoint 2013 - replacing links in Picture Slideshow

I'm using SP2013. The links in the OOTB Picture slideshow link directly to the image. I need to change the array that is default with some sort of script (which I'm not great with). I did find this ...
3
votes
2answers
170 views

SharePoint 2013 list using multiple drop down list as filters

Long time reader, first time poster... I have found many of the best solutions for my problems here, so thank you for all your hard work! I have been trying to get this problem figured out for few ...
1
vote
1answer
25 views

Upload documents from other websites

I want to upload documents from a ASP MVC website to my Sharepoint document library. Found a lot of websites about this topic, but most of them are focussed on uploading documents from within ...
4
votes
2answers
198 views

Disable Edit Item from the SharePoint Ribbon

In my sharepoint 2013 list dispform.aspx, I have one webpart with 'save' button . Once that save button is clicked i want to disable the 'Edit Item' OOTB option from the ribbon . How can i achieve ...
3
votes
0answers
142 views

ctx.CurrentItem undefined in new function

I am editing a item display template in SharePoint 2013. The following problem occurs: ctx.CurrentItem becomes undefined in a custom function. How can I solve this? Here is a little code snippet: ...
2
votes
1answer
49 views

Async wait till variable is set in the display template

I have a problem with excuting the script in the right order. I have a custom.js which is loaded at the top of the masterpage. The following function is included: var results; var followers; ...
1
vote
0answers
28 views

Collection has not been initialized(async)

I am trying to create with search(display templates). To return a list with only the followers. The following error is throwing when running: "Error: The collection has not been initialized. It ...
2
votes
0answers
34 views

SharePoint 2013 - Add-in - JSOM - Create SharePoint Group

I am trying to create a SharePoint Group in a SharePoint Add-in, which has Full Control over the site collection, using JSOM. Here is my code: function createGroup(groupName) { var ...
2
votes
2answers
204 views

run external Script before CSR code is executed

How can I load a script file before the CSR is executing? Microsoft says to https://code.msdn.microsoft.com/office/Client-side-rendering-code-b2eedf92 (function () { // jQuery library is required ...
1
vote
0answers
36 views

slider.js sharepoint 2010 configuration

I am using slider.js (followed this : http://summit7systems.com/a-simple-jquery-content-slider-for-sharepoint-200720102013-and-o365/). It all works fine, but if I wanted the slides to go from 0 1 2 3 ...
1
vote
2answers
50 views

use CSOM for the GetListAndView WebService for multiple lists/views

I know how to use lists.asmx?op=GetListAndView to get list and view details. I'm trying to do the same using CSOM. And, to keep it efficient, I wanted to make one call for multiple lists/views. But ...
1
vote
0answers
30 views

SP2010 - How to stop a Jscript filtering folders

I'm on SP2010, managed by my company so unfortunately no access to server and can't add additional web parts. I previously had the need to build an A to Z filter in a library. I have used a Jscript ...