Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
vote
1answer
35 views

How to use class instead of Id for SharePoint PeoplePicker using JavaScript

I have created a Form on SharePoint using SPD, where I have used SharePoint PeoplePicker to get the User automatically. Below is the code:- $(document).ready(function () { // Specify ...
0
votes
2answers
65 views

Get Current Login User Profile Property in SharePoint SPS-DistinguishedName

For another application, I need to fetch a property of the current logged in user profile in sharepoint. (SPS-DistinguishedName) I've got this code, which works perfectly, pasted line by line into the ...
0
votes
1answer
38 views

Floating button to submit new list item

I am trying to find information on creating a button that I can have "float" at the bottom right or left of a SharePoint page that when clicked will open a dialog box for a new list item to be saved. ...
0
votes
1answer
62 views

React Native (Sharepoint-application)

I have started learning to code in react native. Have an idea of trying to create an application that (creates / updates / deletes) data from SharePoint lists. My question is: How do I create a ...
0
votes
1answer
74 views

Adding Item to SharePoint list using Jquery

I am trying to create a button on SharePoint online classic page which will submit to a list. From there a flow will run. Just a question I have found an example how this can execute. A few ...
1
vote
1answer
30 views

How can I get current user roles for specific document in a document library?

I can add a role to a document with this code: var REST = globalvars.absoluteUrl + "/_api/SP.Sharing.DocumentSharingManager.UpdateDocumentSharingInfo"; var data = JSON.stringify({ '...
0
votes
1answer
25 views

Create tasks programmatically in Project Server

I need to copy tasks from one project to another in MS Project 2016 using JSOM or REST API. I used code like this: function AddTaskToProjectREST(TaskToAdd) { $.ajax({ url: "/pwa/_api/...
0
votes
2answers
55 views

How to create a list item using javascript

I found some code to put a stopwatch on a site page. I want the user to enter their name and the task they are performing and start the timer. When they stop the timer I want the Name, Task and Time ...
0
votes
0answers
18 views

modal pop in list quick update view SharePoint 2013

Is it possible to open a modal pop up; when we save an item from List quick update view?? Note: I'm not using list forms. I have custom item updated and item updating event receiver attached to that ...
0
votes
1answer
31 views

Collapse and expand tables independently with same class name inside SharePoint wiki page

I am trying to create collapsible sections with header (clickable) and description (details about header) inside a SharePoint wiki page. There will be multiple such sections inside the wiki page. Is ...
1
vote
0answers
26 views

Closing modal dialog, script error

Using jquery I'm opening a SharePoint page in a dialog, this works perfectly fine. Now on that page I have a button to submit a custom form and finally close the dialog again. While this works when ...
1
vote
1answer
52 views

Hide “+ Add” in iFrame - News Webpart

I have a new modern news webpart in classic SP Online and I need to hide the "+ Add" Could you explain how this can be done with JS? I have the following code, how can this be used to not load the "+...
0
votes
1answer
21 views

How to: Set default values for required column in a SharePoint 2016 newform.aspx using javascript

I have a simple list with a single line of text column. I have a JS function that reads data from other list an set default value for this column in the new form. I simply use. $(“select[Title=’...
0
votes
0answers
36 views

Programmatically add refinement filter to a Search refiner

I'm following this tutorial: https://www.eliostruyf.com/part-5-search-refiner-control-methods-explained/ Everytime I run this, it alters the ribbon bar so that I can't "Stop Editing" the page that I'...
0
votes
1answer
49 views

Run Javascript after page loads

I want to run some javascript (not jQuery) after the page loads in SharePoint. What method should I include my script in?
0
votes
1answer
21 views

User Custom Action executed twice, second time wipes the entire javascript scope?

I'm extremely puzzled by this one and I don't understand if it's a SharePoint issue or a javascript issue. I've used this flow many times and it's the first time that I observe this behaviour. Here ...
1
vote
1answer
29 views

SharePoint Expandable Headers Solution for Pages - How to make it stay expanded in edit mode

I'm using the below jQuery code I found on the net for a SharePoint page that expands an accordion. It is working well, but I'm trying to make it stay expanded when in Edit mode so it is easier for ...
0
votes
1answer
20 views

How to get value of an event in Calendar

I'm trying to bring the value(Title) of an event to another form in SharePoint. So it's basically a register form. When someone clicks an event, you can click a button "Register" and it brings you to ...
0
votes
3answers
78 views

Add an ID attribute to TD in a table using Jquery

I want to add an ID attribute to a td elemnt in a table genrated by sharepoint. I tried like this but it is not seeting the same. Attached is the DOM object of my sharepoint form $('ms-formtable ...
0
votes
1answer
23 views

Get UserName and Date when i click on a button using Javascript

My HTML code is : <button id="app1" type="button"onclick="javascript:Approver(ProspectID);">Approver</button> My JS code : function Approver(ProspectID) { var userid = ...
0
votes
0answers
22 views

debugging SharePoint JSOM, client side code in the F12

though its not a programming question,i would like to know how to debug the SharePoint code that's written in JSOM, REST API,or spservices. i tried to put console.log etc etc for the values spweb , ...
0
votes
1answer
21 views

Single Page App (SPA) utilizing several lists and libraries

Does anyone else build SPAs with multiple lists and libraries? I've built many with single lists or libraries. My task is to build an app which would allow users to enter data about a project, upload ...
1
vote
1answer
51 views

Can i force my Calender's events to open in a new tab

I am working on a sharepoint online classic team site. and i have added a Calendar list named Events. but inside the calendar view, when i click on an event, the event's display form will open inside ...
1
vote
1answer
40 views

Send exported Word Document from another application to SharePoint Library (SP2013 on-premise)

First of all, there are similar questions on this forum, but I don't really know if and how I can adopt them to my Use-Case, which is based on a workflow script. I am working on a script, which ...
0
votes
0answers
19 views

Custom Search for a Custom List

Searching is a beast to understand in SharePoint. I am working in SharePoint 2013 Enterprise and created a custom list that has hundreds and hundreds of list items. I cant use the search box for the ...
1
vote
2answers
36 views

How to properly load all required javascript in a Web Part in SharePoint online

In a Web Part how to load all required javascript? In which order? I've tried various combinations, but there is often some problems. I stress one more time that I am using SharePoint Online. At ...
0
votes
1answer
34 views

Javascript checkboxes to show/hide overlays on main SharePoint calendar view

I've got a main Global calendar with Regional calendar overlays associated. Currently, clicking the colored tabs will only redirect the user to the filtered calendar view associated with tab name. ...
0
votes
2answers
22 views

How would I hide 2 columns in SP13 if column A if the answer is No in SP13?

I'm haggling over how to "hide" 2 columns when a specific column drop down answer is "No". Assuming I use JS, would I save the script in Site Assets and refer the link on CEWP? Here's the script I ...
0
votes
1answer
27 views

Fetch the text value of Nobr based on child td

I wan't to fetch the text of nobr based on child td. MY HTML is below in screen shot I tried like this but it gives me empty value $("[id^='FormatShouldReturnas']").parent('td nobr').text();
0
votes
1answer
34 views

How can I use the PnP libraries with a sharepoint add in?

I have to build a SharePoint Add In app. But, it seems like Microsoft and the SharePoint community has invested heavily in tooling for SharePoint Framework and Add In's are left behind in the past. I ...
1
vote
3answers
83 views

Get Specific <td> tag in Sharepoint List New Form jquery/javascript

I need to add a span element to a specific in Sharepoint List New Form.But, how to get that specific td element using jquery ot javascript. Anyone can help me in this? beside to single line text ...
-1
votes
1answer
41 views

how to alert message in sessinStorage

I have a button on my update page. This button redirects and refreshes the page after sending sms I want that; If the user pushes the button and sends sms 1 time, do not press the same button 2 ...
1
vote
0answers
37 views

Save document template from AppWeb to HostWeb document library

I am trying to create SharePoint app. Basic idea is to create document in hostweb document library from AppWeb (document template stored in AppWeb doc lib). In Details : I have created ribbon ...
0
votes
2answers
60 views

How to redirect users to a different page/URL on a SharePoint save button click in New item form?

I am having an issue about redirecting users to a different URL on Save or Cancel button. First of all I have used below code to change SharePoint list new item form's Save button to Submit. <...
0
votes
0answers
25 views

Printing SharePoint online web parts

I am using the following to print all the web parts on a SharePoint online webpart page and it is working however I am missing my headers. I have customized my headers with CSS to show background ...
0
votes
1answer
44 views

How to hide a part of ribbon bar?

I have a start page with some views of normal and promoted links list. In these displayes I turned off the toolbars. But on the starter page ribbon, the list toolbar appear if a list item is selected ...
0
votes
2answers
48 views

jQuery .combobox() breaks SPCascadeDropdowns relationship

I've implemented SPCascadeDropdowns functionality on SharePoint Online into my new item form. That's ok and it works. $(document).ready(function(){ $().SPServices.SPCascadeDropdowns({ ...
0
votes
1answer
30 views

Is there is any way to create popup form on button click in SharePoint Add-In

I am trying to create popup form on button click when i click on "create document" button then popup will be open and on that popup form i need one text box and button. please let me know how can i ...
0
votes
1answer
32 views

Nested queryAsync trying to get terms Sharepoint Online

I'm trying to get the terms from sharepoint online and put them into a select tag using JavaScript. My terms are set up like I have main categories and each of them have sub categories. For example ...
0
votes
1answer
18 views

problem with deleting and creating same look up field in a picture library

in my project, there is a picture library with a look field. I delete and create this lookup field like that : function MajBibliPhotoGare() { var clientContext =SP.ClientContext.get_current(); ...
0
votes
1answer
53 views

How i can check if my Date Time field is less than Today() date inside JS script

I have the following JS script to color code our custom list items inside out list view, by checking if the item is status does not equal Delivered and its EndDate has been bypassed:- SP.SOD....
0
votes
2answers
60 views

Uploading multiple files to a list

I'm "developing" a SharePointlist which requires to upload two pdf files at the same time, I got this code on the internet: function upload() { // Define the folder path for this example. var ...
2
votes
1answer
55 views

Populate people picker during PreSaveAction

I'm in a SharePoint 2013 on-prem farm. I have a people picker field called Managers that I want to populate based on users in another people picker field. Once the user clicks Save on the New Form, it ...
1
vote
1answer
24 views

Need timestamps for the completion of each stage in a work process flow

I'm using a MS SharePoint-based Intranet site to track and report the status of a requisition as it moves through its review processes. There are six stages in the process flow and, for performance ...
1
vote
2answers
88 views

JSOM Error: unable to get property 'apply'

I get an error after attempting to update an item SharePoint 2013. This one is a bit of a challenge since it's referencing a different file. var siteUrl = _spPageContextInfo.webAbsoluteUrl var ...
1
vote
1answer
42 views

JSOM oListItem is undefined

I am using JSOM to update an item in a list, which I've had no problem with in the past. But for some odd reason I'm getting an error that I'm not sure about. Maybe I'm overlooking something small. ...
0
votes
1answer
22 views

Best approach to create clickable image to link to .aspx page with latest modified date?

I have a clickable image that exists on a classic sharepoint online team site that links to a page stored in the /SitePages libraray. This was integrated through a CEWP that points to a simple html ...
0
votes
2answers
58 views

Get current user name into the single line of text field for newform.aspx using Javascript in New Item form

newitem.aspx opening into the popup, so where do I need to add Content editor webpart. While opening newitem form, I need to autopopulate current user Name into sigle line text field?
2
votes
1answer
131 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 ...
1
vote
0answers
29 views

Automatically add the “fill-in” value from the Choice column to the dropdown list

I wish Microsoft included a second checkbox for the Choice Column labeled "Capture 'Fill-in' choices" that would automatically add the user's fill-in choice to the dropdown list. I'm using SP2013. I ...