Questions tagged [javascript]

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.

1,330 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
1k views

how to implement the lastest angular 2 version with sharepoint hosted add-ins

Hi I'm trying to implement angular 2 within a sharepoint hosted app, I followed the scot hillier's article Build a SharePoint Add-In with Angular2 and TypeScript but it's a little old and I'm having ...
3
votes
2answers
86 views

“eval is evil()” - But can it be a way around some of the limitations of Minimal Download Strategy?

The process of getting custom JavaScript to work with Minimal Download Strategy is quite cumbersome and especially in the prototyping phase I like to write my (smaller) scripts inline in a Content or ...
3
votes
2answers
1k views

How to restrict the number of lines to show using jquery or css?

i have created simple Custom webpart. It looks like in that web part, Description display multiple line . i have used html P tag to display Description value <p>​Loream Ipsum​Loream Ipsum​...
3
votes
1answer
140 views

How to know which people picker is which

I'm trying to replace all of the "bad" old-style people pickers on our custom new/edit forms with the new good client-people pickers. With this thread I came up with the idea to use jquery to find ...
3
votes
0answers
1k views

CSR: RegisterModuleInit without hardcoded JS filename?

Always looking to make CSR development easier... This the typical CSR programming pattern: We hardcode the filename inside the CSR file SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", ...
3
votes
1answer
960 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: ...
3
votes
0answers
497 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 ...
3
votes
0answers
623 views

Sharepoint Authentication via REST API

I would like to connect to Sharepoint via REST API and Javascript. Based on readings I've done, first you need to have Security Token, then you use this Security Token to get FedAuth cookies, ...
3
votes
0answers
7k views

ULS logs filling up with Error: Failed to get document content data

Our Sharepoint farm's homepage constantly generates these "High" log items, making other debugging difficult. As far as I can tell, it doesn't acutally cause any problems. Error: High - Database ...
3
votes
0answers
257 views

How do I restore specific list item version using JavaScript?

How do I restore specific list item version using JavaScript? Is there any way to restore specific version of list item using JSOM or REST API in Share Point?
3
votes
1answer
1k views

how to by pass multiple claim authentication login page in sharepoint 2013?

My Requirement is I have SharePoint Server 2013.Now I just added two AD FS Server 3.0 and configured to SharePoint site http://spsxyz with Claim based authentication. An example of My Server Setup: ...
3
votes
1answer
5k views

Full-Calendar Js not showing events

I have created an html page in which i have palced the full-calendar code. the script retrieves data from my shareoint calendar list - "Room Reservation" using SP-Services. I am able to get the ...
3
votes
1answer
61 views

Getting back-end data and displaying it in the client

My SP Admin level is strong. My SP dev level is beginner. I know some JavaScript. What is the best method of bringing Server and Farm information from the back-end to the client-side? For example, ...
3
votes
0answers
292 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 ...
3
votes
1answer
5k 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 ...
3
votes
2answers
858 views

Get object of ribbon button in JavaScript

I am trying to access the ribbon button via JavaScript. Below is my code: // Get the page manager var ribbonPageMgr = SP.Ribbon.PageManager.get_instance(); // Get the ribbon var ribbon = ...
3
votes
2answers
1k 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: In ...
3
votes
1answer
797 views

SharePoint 2013 App Office 365 copy list item

I try to build an SharePoint hosted app, have started with a custom menu action. When I choose it I want to copy the selected item and automatically change some metadata for it. Problem is I can't ...
3
votes
0answers
334 views

SharePoint Edit Mode Javascript error in edit mode

I am not able to edit the page from the browser. I used to change and edit webparts when suddenly in the edit mode everything looks like it is locked/stalled. When I open the debugger tool, I saw a ...
3
votes
1answer
113 views

SharePoint 2010: Create a compilation email from multiple items

First of all, the tools I have available to me are SharePoint Designer and InfoPath, and I am much more comfortable in the former than the latter. I have a request to create a solution to facilitate ...
3
votes
1answer
532 views

Filter list items using custom field type in REST API

I have a custom field type created by inheriting default SPFieldLookup type field. I have a SharePoint custom list with these type of fields. I want to fetch list items from this list using REST API. ...
3
votes
2answers
89 views

Create a folder and add properties (field values) to it on form submission

I have created a simple form on SP site, on the submission of which a folder with entered name in the form would get created in the desired doc library.Library has some custom columns such as ...
2
votes
0answers
22 views

javascript to approve Microsoft flow

I have created several Approval flow. These flows send an approval email to approver and they work fine. Now I want to create a page (classic sharepoint) with all items of all flows to approve (...
2
votes
1answer
80 views

Check if a user is a member of SharePoint group JS REST API using async await

How can I check if the current user is a member of a specific SP Group using REST API and async/await? _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getbyname('" + grpName + "')/...
2
votes
0answers
29 views

Custom validation for people editor control

How to add custom validation for in asp.net if the user adds more than one username an error message must appear that he can only add one user. Thanks Regard.
2
votes
0answers
44 views

Update a library field when uploading a file using javascript

I am using a spfx webpart to upload a file and modified a column value associated tothat file. The code below works and stop working without any reason and i can modify only the title field with it. I ...
2
votes
1answer
58 views

Calling executeQueryAsync in each loop for sharepoint javascript

I want to update table rows with information from a Sharepoint list. So, I am calling executeQueryAsync within a For Loop and it only updates the last item, but not all. var oRows= $('#dataTable tr');...
2
votes
0answers
29 views

permissionKind returns void in React

I have a search function that returns all list items including their parent link based on their content type, tenant-wide. Every list item comes from a specific subsite and I want to split the ...
2
votes
0answers
315 views

SharePoint 2013: what is the use of “customstrings.js”

I have a Content Search web part with a dynamic query on a SharePoint page in our site. When I added this web part it was throwing below error: One or more of the following resource files failed ...
2
votes
1answer
511 views

Add Dynamic Property Panes to SPFX

I know this has been asked 1000 times, but i've tried everything in the first 2 pages of google so i've decided to come to you guys for help. I'm trying to create some dynamically added property ...
2
votes
1answer
92 views

html & javascript to change URL on a form action based on a drop down

Using simple html and javascript how can I have one html form that asks two questions: Text OppID Dropdown LegalEntity LegalEntity will have available company1 & company2 When company1 is ...
2
votes
1answer
31 views

Color coding list custom field in SP 2013

We have a field called next due date. I'm trying to color that field if it exceeds the date. Red color if exceeds the date and yellow color if it is 1 day near to the due date. Please guide me on ...
2
votes
0answers
23 views

Displaying Image on SharePoint page from another SharePoint site (Of different Farm)

We have two different SharePoint server on different farm. We want to take images from one SharePoint site library and display it on another site page. We have given URL of images on page but it is ...
2
votes
0answers
86 views

Another “load required sharepoint files” issue

I know there are many posts on the subject of dynamically loading SP files. I've tried so many of them, but none of them seem to work. As I was trying to solve an issue I realized I had to back up and ...
2
votes
0answers
31 views

Display the meta data of a page on the page itself

I want to display the page metadata (e.g status) of an aspx-page on the site itself. The sites are located in the default site pages library. library: Name:page1 Status:draft Name:page2 Status: ...
2
votes
0answers
35 views

retrieve Date and time filed value from one list and assign it to another list field “share point online”

so far i have retrieved the values and assigned them from "List A" to "List B" with same column names, 1) but date and time column called "End date and Time" needs to be split in to date and time ...
2
votes
1answer
73 views

After migrating my sites from SP 2013 on-premises to SP online, the JSLINKs associated with site columns did not work

I have SharePoint on-premises 2013, where inside some site collections, I define JSLINKs as follow, to disable site columns inside the quick edit grids:- (function () { var overrideContext = {}; ...
2
votes
0answers
173 views

error starting sp2010 workflow in sharepoint Online using javascript

I am trying to start a sharepoint 2010 style workflow which is configured on a list in sharepoint Online. I can't figure out where my problem is - each time I try to start the workflow with code, an ...
2
votes
1answer
734 views

Redirect to thank you page after submitting survey

I'm using sharepoint 2013.I created a survey using the survey app. I added a web part script to the survey. I tried to redirect to a thank you page after clicking the finish button on my survey. It ...
2
votes
1answer
211 views

Sharepoint Online new form move bottom save button location and change text to submit

I've made some edits to the new form whereby I hide several fields. Issue is, the table sections which hold those hidden items are causing a large gap between the apparent bottom of the form and the ...
2
votes
0answers
100 views

JavaScript. Use Outlook online API from SharePoint online page without double user authorization

Is there any way to get user's events from Outlook online with JS from SharePoint online page without user re-authorization? What API can be used? User is already authorized on SharePoint Online, is ...
2
votes
1answer
163 views

How to Remove previous and future month date from calendar view so only current month is displayed

I am very new to the SharePoint and hope people can help. I have setup a calendar and was able to apply CSS to make the calendar into weekday only. http://www.c-sharpcorner.com/UploadFile/fc34aa/hide-...
2
votes
0answers
249 views

View Last Published Version

I am trying to create a document library, which has a default view of the most recently published major version. If anyone checks-out a document to create a draft, I want other editors to be able to ...
2
votes
1answer
55 views

Unreachable JS trying to use Status Indicators - SharePoint Online

I follow this tutorial to get column painted I have a list called: "Seguimiento de Sistemas" It have a column with select list called: "Status" Now I have that list in a WebPart and js into ...
2
votes
1answer
82 views

Passing displayed item ID to a newitem form of a webpart

I have a webpart with list B put in a displayform of an item of list A . Lets assume its for adding grocery in your basket where list A contains baskets and list B groceries with a column associated ...
2
votes
0answers
92 views

Key Filters fields which contain Managed metadata columns will float out of the layout if i move the mouse over one of the managed metadata fields

I am working on an enterprise wiki site collection inside sharepoint farm 2013 on-premises. now i enable the metadata navigation and filtering site feature, and i added 5 managed metadata site columns....
2
votes
0answers
40 views

SharePoint add-in won't create subsites upon button click

I have recently created a add-in for SharePoint online that will allow me to make a subsite. My written code doesn't show any errors, but it seems like it won't execute after a button click. <...
2
votes
0answers
27 views

When two client context scripts collide

Got a publishing page with two custom sections using javascript. the first is defined on the master page and filling some dropdowns in the left navigation bar the 2nd is defined on the page layout ...
2
votes
0answers
22 views

Parent-Child Indexes

I have two (2) lists that I've connected by an "Control ID" field, using the Web Part connection - the thing is, when I update the Child list [using "New Item"], the Parent "Control ID" value does NOT ...
2
votes
0answers
129 views

Accordion h2 open by link

using code from this site i have added accordion to SharePoint page. Now i'm try to open certain part of accordion by link from external page. I guess it should be done with hash but unfortunately ...