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,494 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
125 views

Plotting of list data using pyscript

I have SharePoint 2013 and 2016 environments that I like to add some plots for some custom lists (webapp part) of SharePoint. I thought of using pyscript but I couldn't go too much further as I can't ...
trblnc's user avatar
  • 111
1 vote
0 answers
53 views

SharePoint Designer 2013: Including Javascript Code

I'm trying to include the following code into SharePoint Designer on a web page. How can I best do this? When I copy-paste, no results show. The site below mentions using a content editor web part, ...
user18172595's user avatar
1 vote
2 answers
3k views

Uploading files from node/Express.js server to sharepoint

I'm trying to send a file to a SharePoint folder using the sp-request module. I can upload a .txt file and it opens correctly. But when uploading .docx files, the file becomes corrupted. My collection ...
Marcos's user avatar
  • 23
1 vote
1 answer
550 views

Get Current Folder URL using Client Context for JavaScript

I am currently trying to retrieve the current URL of a document library using JavaScript. My ultimate goal is to un-hide a web part when the user clicks a specific folder. Right now, My code so far: ...
michelle's user avatar
1 vote
1 answer
13 views

Can I overload a URL to return multiple subfolders in a calculated column?

I have two images that are both located in my site assets folder and I want to show the two images based on when a source column returns "yes" or "no". I have a wrapped around a ...
Chief Simz's user avatar
1 vote
1 answer
759 views

Cors Error when generating access token for SharePoint point online from a JavaScript application

Any help is much appreciated. I'm trying to save data from a html form to a list in SharePoint online. I'm using SharePoint REST API to add items to the list. Ajax call to generate access token is ...
user100006's user avatar
1 vote
1 answer
686 views

Try to download multiple files from SharePoint library on Button click

I am trying to download multiple files from SharePoint library by clicking on Download All button. The image is given below: How can I download all files from SharePoint library on a single click on ...
Shreya's user avatar
  • 55
1 vote
0 answers
60 views

Edit and Delete options for each sharepoint list item using query Datatables?

How to use jquery Datatables to add - Edit and Delete options for each sharepoint list item. Please help me with an example.
Amar Singh's user avatar
1 vote
1 answer
239 views

Pass whatever is at current page ID to next page using a url

I want to pass my current ID dynamically when I click a hyperlink button from my ../dispform.aspx?ID=248 page to a second page .../dispformManager.aspx?ID=@ID Does anyone have the correct code for ...
user95039's user avatar
1 vote
1 answer
271 views

SharePoint 2013 how to run JavaScript or jQuery for calendar add event popup window

I have a calendar app created in SharePoint 2013, I want to Autofill Location text field in popup window of add new event. How can I do it with help of JavaScript or jQuery?
Azad Kolachi's user avatar
1 vote
1 answer
106 views

Sharepoint and JavaScript - if one field has different value from second field, then hide third field

I am noob in coding in JS and SharePoint, I've to check two conditions in NewForm.aspx. If field, for e.g. "Name" has value "Test", and field "Second Name" has value &...
analyzer64's user avatar
1 vote
0 answers
363 views

How to determine user logged in and session not expired in SharePoint using JavaScript

I created a clientside application for SharePoint using javascript and jquery. We use Rest API for CURD operation on SharePoint Data and config Idle Session Timeout for the inactive user. After a user ...
m0st4f4's user avatar
  • 31
1 vote
2 answers
275 views

Using javascript I need to highlight a row if it is within 14 days of becoming due via due date, and red it if is past due or today

So I have this code that I found here at Stack Exchange that lets me highlight rows based on date: SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function () { ...
Mike's user avatar
  • 11
1 vote
0 answers
70 views

SharePoint 2019 javascript SP.MoveCopyUtil.copyFile not working across site collections

In SharePoint 2016, I was happily surprised to benefit new javascript functions available in SharePoint : SP.MoveCopyUtil.* to get out of the hell of copying files in SharePoint. The following peace ...
user21090's user avatar
1 vote
1 answer
31 views

Running an application setup script using content editor

Preface, I have absolutely no experience with SharePoint (we use 2016) and I've received tasking that requires me to set some things up. Basically, my org wants to set up a stress test application on ...
Jack's user avatar
  • 11
1 vote
0 answers
80 views

GraphAPI send invitation to external/guest user for a specific SharePoint site

Language: JavaScript - MSAL library Scope: GraphAPI Is there a way to send an invitation to an external user thorough GraphAPI that will be valid only for a specific site. Currently I am using the ...
JohnRambo's user avatar
  • 187
1 vote
0 answers
155 views

OData query to get a field values by column position in the list

So I want an OData query that allows me to get the field and its values by position in the viewable list. In the above picture, for example, I want the values in the "Title" column but that ...
CleverlyDone's user avatar
1 vote
0 answers
329 views

409 'Conflict' Changing ContentType property of Document Library

I have about 600 items in a document library. The library has 9 content types defined in it, which is part of a reorganization to take items out of folders and make it folderless. The library is a ...
Steve Penn's user avatar
1 vote
3 answers
978 views

Make html page with Sharepoint REST result

I'm new with javascript and HTML, so please be patient. I'm trying to make very simple HTML page displaying text with value stored in sharepoint 2013 list. I've made REST query in which I've item with ...
mrik's user avatar
  • 11
1 vote
2 answers
35 views

Simple Modal SP Online (2013) - not working

<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial, Helvetica, sans-serif;} /* The Modal (...
blackblossom's user avatar
1 vote
1 answer
92 views

SPServices is not working in one environment and working in one SharePoint environment/

We deployed solution in one SharePoint server, and uploaded the js file after solution deployed. we are getting the following errors on debugging JS. SCRIPT438: Object doesn't support property or ...
sushma manne's user avatar
1 vote
1 answer
45 views

SharePoint 2013 DOM dialog object

I'm using SP2013 and I am trying to refresh one of many list web parts on a page with the Manual Refresh button displayed for each list. The current display view has four lists associated with it each ...
Pablo's user avatar
  • 75
1 vote
0 answers
64 views

SharePoint 2016 List - Edit Form - Radio Buttons

I have a SharePoint List to collect some information. I have two radio buttons and based on which radio button is selected, only specific fields will be shown and the others hidden. This works great ...
Kevin Reynolds's user avatar
1 vote
2 answers
94 views

CAML Query not display in Sharepoint2013

My end goal is to display items from SharePoint 2013 list that is more than 60 days from today and status is in process. This is my first time using CAML Query in JavaScript. I am not able to have the ...
Madeline's user avatar
1 vote
1 answer
1k views

How to use people picker control using sp-pnp-js( Pnp-JS-Core) library and save users selection in Person or Group type column in Sharepoint List?

As I am new to Sharepoint framework, I wan to know how can I use the people picker control using sp-pnp-js library and save the users selection in Person or Group type column in Sharepoint List.... I ...
Nidhi Maheshwari's user avatar
1 vote
1 answer
52 views

Why does the SP.SOD.executeFunc function not work properly?

I use this code to compare two dates, the date of today and the date in the list item. On the screen the dates look fine but when I check them in the debugger the dates are way off. Some are even one ...
user14010662's user avatar
1 vote
0 answers
140 views

How to convert word document to PDF in SharePoint 2016

Is it possible to convert a word document to PDF on SharePoint 2016 using custom code such as JavaScript ? I have heard of Word Automation Services but I am looking for custom code solutions that ...
bteferi's user avatar
  • 11
1 vote
0 answers
120 views

SPFx define custom config folder for building solution

Is it possible, to somehow define which config folder gulp will take while bundling. Saying i will have a build script for each sppkg solutions gulp clean && gulp bundle --ship && gulp ...
Valerii Petrenko's user avatar
1 vote
0 answers
13 views

Is there extra Javascript involved in the 2016 version of a multi-lookup control?

I have to filter the available options for a multi-lookup field based on the value of a Taxonomy field. I had it working in 2013 doing this: On page load, detach all the option elements from the ...
Dylan Cristy's user avatar
  • 12.6k
1 vote
2 answers
434 views

jQuery hiding column based on another column's value

I've successfully used the following script in NewForm.aspx to hide a column 'Date SharePoint checked' when another column 'Check SharePoint?' is set to 'No'. When I open the same list item in ...
Stu's user avatar
  • 21
1 vote
0 answers
109 views

Can the onListViewUpdated() method run async?

I need to implement a button that is only visible if the user has edit permissions for an item in a list. Therefore I have to make an async api call in the onListViewUpdated() method, but I does not ...
maxE's user avatar
  • 131
1 vote
4 answers
2k views

Is it possible to change the owner of a group using Rest API?

I am creating Sp groups and the Owner gets set to whoever runs the script. I am trying to set the owner to another group or user and it is not working. The SP.Group documentation says it should work ...
Lore.A's user avatar
  • 11
1 vote
2 answers
574 views

Is it possible to disable weekends from Sharpeoint Datepicker field

Is there an option to disable the weekends in default Sharepoint Datepicker field, I was able to disable the past days with the help of the below URL: How to disable previous date in a calendar in ...
Sairaj Kapu's user avatar
1 vote
1 answer
88 views

SharePoint REST API Call returns result as block of array

I have a REST API call in SharePoint and everything is working as expected, however the output returned by call is array of array if more then 100 records are fetched (attached image): I am not sure ...
Vijay's user avatar
  • 11
1 vote
2 answers
24 views

Unable to save all users into SharePoint list

I am creating a list item using the code below: var context = new SP.ClientContext.get_current(); var dfd = $.Deferred(); var targetList = context.get_web().get_lists().getByTitle(listName); ...
entryton's user avatar
  • 332
1 vote
1 answer
741 views

Loading External JS File Into Script Editor WebPart

I have the following piece of JS code that shows All Views associated with a SharePoint list (without having to use the contextual menu): <script type="text/javascript"> ...
Nerd Gorilla's user avatar
1 vote
1 answer
95 views

Copying Files based on a custom column value between document libraries in SharePoint using javascript

I am new to Javascript and currently working on a task where I need to copy files based on a custom column name "PID" from One Document Library to the other. I was able to get the below code to work ...
Vivek Murli's user avatar
1 vote
1 answer
42 views

Sharepoint access to API

I was asked to develop a program that extracts the properties of each user profile. I'm using ASP.NET Core and Visual Studio and I'm trying to use AJAX and Javascript to do the requests. Here's my ...
aRip's user avatar
  • 11
1 vote
1 answer
778 views

Update person field (multiple selection) using JavaScript without PnP

I am trying to create an SPFx web part using SharePoint 2016. When adding PnP to SharePoint 2016, it's giving me errors and not working like when I add it to a SharePoint online SPFx web part. How can ...
Dan's user avatar
  • 21
1 vote
1 answer
597 views

SPO Modern Site - Hide the Suite Bar

I have a requirement to hide the O365 - SharePoint suite bar / ribbon on modern communication site and on the site pages, but there do not seems to be an OOTB setting / option to do so (yet). We ...
samolpp2's user avatar
  • 3,530
1 vote
0 answers
369 views

Sharepoint putting extra "src" information in <img> tags

I'm trying to find a resolution to a problem i have never came across previously. I have created a quill rich text editor where i intend to put text and images that i can store as html in SharePoint ...
Dániel Pfeiffer's user avatar
1 vote
1 answer
36 views

How can I fetch only AD groups not SharePoint Groups with REST API or JavaScript?

I want to fetch the a user's membership and AD groups (Not SharePoint Groups). So, how can I fetch the data using REST API or JavaScript?
f_gulay's user avatar
  • 641
1 vote
0 answers
103 views

How can I capture a URL Parameter on a list page so that I may append it to the URL of an "Add New Item" button?

Scenario: I have a list page that has already been filtered from a prior table via a URL parameter. How do I carry that URL parameter over when "create a new item" button is clicked? Issue: On the ...
Chuck Farley's user avatar
  • 1,159
1 vote
1 answer
141 views

Adding the metadata to a taxonomy column in JSOM

I am struggling getting taxonomy into a metadata column using JSOM. I cannot find any great learning manual for JSOM. var fieldSchema = `<Field Type="TaxonomyFieldTypeMulti" ...
Jason Hough's user avatar
1 vote
1 answer
99 views

Document Upload Custom Browse Button

I am trying to customize the "Browse/Choose File" button on a document upload. I am using SharePoint 2016 on-prem, classic. So when a user clicks the button to select the file from their computer the ...
Darcy Brown's user avatar
1 vote
1 answer
251 views

Event after Ribbon tab context/commands load?

In MS Project Server, on the Project Center page, I want to make it automatically show linked sub-projects in the main view. You can get the sub-projects to show by clicking on the PROJECTS tab in ...
Dylan Cristy's user avatar
  • 12.6k
1 vote
2 answers
554 views

Approve/reject workflow with comments client-side

I have a list which has a "SharePoint 2010 Approval workflow" associated to it and would like to provide the use with simple buttons to approve/reject the workflow after it was started. I managed to ...
user1371019's user avatar
1 vote
1 answer
360 views

webparts using @pnp/js

I am trying to create a sharepoint page that contains a webpart which contains some text and images. I am trying to do this using pnp/js. I have been able to create a page using pnp/js, but I can not ...
Joel's user avatar
  • 11
1 vote
1 answer
155 views

Call custom javascript code on list new form save button

I have to write a java script code which copies the look up column value into a single line of text.I should call this script on list New form OOB Save button click. How should I call this custom code ...
Swetha's user avatar
  • 377
1 vote
1 answer
885 views

How to disable all inputs inside `<div>` in SharePoint 2013 form?

I want to disabled/readonly inputs on some fields in SharePoint 2013 New/Edit forms based on a field's value. So I manually add <div> around group of <tr>. <div id='myDiv'> <...
JJL's user avatar
  • 37

1
3 4
5
6 7
30