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.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Particles.JS Background for Body of SharePoint Page

I have created this particles.js script that I want to use for one of my SharePoint pages, but I am unsure of how to get it to insert to cover the whole background. I tried inputting it as a a script ...
0
votes
1answer
18 views

Save Modern Site Page as Template

Slight dilemma. I created a modern Site Page and want to save it as a template. I tried many steps as you can see below. Are there other ways to saving as a template? Save as a Template not listed ...
0
votes
1answer
16 views

Regex to remove “&#160”,<br> and <p></p> Javascript

I want to remove the tags and spaces: "&#160",<br> and <p></p> from my content. I tried below removing p and br tags : let Desc= response[i].Description.replace(/<p&...
0
votes
0answers
5 views

How can I create a nodejs provider hosted SharePoint add in

AS-IS: I'm programming NodeJS apps that connect to sharepoint using ADFS - no problem, works like a charm TO-BE: Register the NodeJS app as an add-in. I'm having trouble finding a way of doing this. ...
0
votes
1answer
17 views

Dynamic REST Statements

Is there a way to dynamically create a REST call and specifically I am referring to the data: section of the call. If I get the terminology incorrect by all means keep me honest. I tried some things ...
0
votes
0answers
10 views

Unable to open custom list, keeps opening in window pane

I have been working on a sharepoint site that have two seperate custom lists, one list called project starter and second list is called new drill. the project starter list is working correctly but new ...
0
votes
1answer
32 views

Trying to upload files to SharePoint list AngularJS and REST API

I have a SharePoint hosted html file with a form that I use to add a new list item to a SP list via the REST API. I am also reading data from the list using AngularJS for both reading and writing to ...
0
votes
1answer
25 views

Hide SharePoint list content/rows based on user group permissions

I'm a little padavan when it comes to coding;) I looked for the following codes via google and pieced them together;) but now of course I have reached my limits;) I have a Sharpoint Grouped Listview; ...
0
votes
1answer
20 views

Get ListCount counting only user view list items

I have below code, to fetch the count of sharepoint list items to auto generate next item number by incrementing it. But somehow it's only fetching count of list items per user (list is protected to ...
0
votes
0answers
13 views

Sys.CultureInfo.CurrentCulture has wrong info

I am working on SP2016 OnPremise, client side. I used the following function to format my Date objects: SP.DateTimeUtil.SPRelativeDateTime.getRelativeDateTimeString(new Date("2020-01-01") , ...
0
votes
3answers
39 views

Hide text in SharePoint 2013 using script editor

I am trying to hide the date (see screenshot) because it displays the wrong date. Probably for now the easiest way to fix is to hide the date. When I click on the date it brings me to: <span title=&...
0
votes
1answer
15 views

How can I open a Provider Hosted App in SP Modal Dialog in SharePoint Online?

I need to open a provider hosted app inside a SharePoint Modal Dialog. The provider hosted app is hosted in AZURE Web App Services. I have tried several examples that I could see in Microsoft ...
0
votes
2answers
60 views

Axios response.data is string of the XML data instead of JSON object

Axios get call receiving the right information but it comes back as a string of the XML data. I need a JSON object. I am grabbing all the tables on the page then I filter through them and then I want ...
1
vote
0answers
14 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 ...
0
votes
0answers
11 views

List Color Coding (JS) isn't working on page that also has KPI Indicator list in SP 2013

I have a list that I've applied color coding to via JS/Content Editor Web Part. I'm trying to apply the JS to a page where we've referenced the list in multiple web parts. Additionally, the page has ...
0
votes
1answer
15 views

SP2013: Disable text or number field once populated

I am looking for a jQuery script to conditionally disable two field types: Disable a text field if it is not blank and Disable a number field once it is non zero. I see many posts on disabling ...
0
votes
0answers
28 views

Cannot upgrade typescript version of SPFx project “Error - [tslint] error TS5023: Unknown compiler option 'declarationMap'.”

I have a SPFx solution with typeScript 2.4.2 that I want to to upgrade to 3.3. I follow this guide: https://www.eliostruyf.com/define-the-typescript-version-you-want-to-use-in-sharepoint-framework/ ...
0
votes
1answer
25 views

Calcluated Column multiple IF with SEARCH statement coming up as #Name?

I want to search each cell in a column for a certain pharse. I figure I should use IF statements but since the following text can be anything I need to incorporate a SEARCH statement as well. Like at ...
0
votes
2answers
25 views

Author/Id returning number instead of name

I'm using the following URL to get data from a list. The last item in the URL is the Author/Id but it returns a number. How can I get the user's name instead of the number? url: https://.../org/eu/EU3/...
0
votes
1answer
11 views

Accordion Collapses Immediately After I Expand a Row

I am creating a drop down table with Accordion on my SharePoint site. I referenced this page (P.S. I hate W3Schools) https://www.w3schools.com/w3css/w3css_accordions.asp#:~:text=An%20accordion%20is%...
0
votes
1answer
27 views

SharePoint Online Show/Hide multiple fields based on choice

I have a form similar to the one below, I am using script editor in web parts on SharePoint Online. If I select 'YES' it will reveal a second drop down list hiding 'Item 1'. If I select 'NO', it will ...
0
votes
1answer
12 views

Hide particular choice option

I have a SharePoint list which has a choice filed. Choices are A, B, C. Is there anyway I can hide B from the users. I don't want to delete the B option I just want to hide it from users. Regards
0
votes
1answer
17 views

Filter list by Author (Created By) field with rest api - SP Online 2019

So I'm sending a REST query like: _api/web/lists/GetByTitle('List')/getitems?$select=AuthorId It works fine, I see 49 records with AuthorId. Now I want to filter by this column. Then I want to filter ...
0
votes
1answer
42 views

OData query to get the results of two specific columns

I stuck on how to get two specific columns of data. My query: {site}/_api/web/lists('{site_guid}')/items?$select&fields eq meatballColor,meatballExplained I only get 7 items coming back when it ...
0
votes
1answer
17 views

Javascript REST results processing

I'm using JavaScript to pull data from a SharePoint 2013 list. The REST request works fine and I can see the data in the debug windows of Chrome. I am struggling to determine how to access specific ...
0
votes
2answers
21 views

Sharepoint:formField Javascript

We have a custom SharePointFormField for your DisplayForm and DOM Looks like this. <div class="FormRow"> <div class="FieldLabel"> <a name="SPBookmark_FileID&...
0
votes
0answers
31 views

SPFX Source URL Redirect NOT Working

I am currently working on a custom WebPart in SPFX and am having some issues with a URL redirect. The code is looking to see if a field is empty, if the field == empty then it will automatically ...
0
votes
2answers
24 views

I need JavaScript to add sequence based on value in last added item in SharePoint list

I need a JavaScript to add sequence number based on sequence number in last added item (I do not want to use ID for increment in sequence). Eg: Auto sequence column is with value 1 ... on adding ...
0
votes
1answer
33 views

How to Set Color Indicator for the Next Page

I have a list on SharePoint with classic view mode. I create color indicator in Content Media Web Part with uploaded file Java Script in Site Assets. But when I make the item limit per page to 10 ...
0
votes
0answers
16 views

Online ribbontabselected not working

We are moving our on-premise SharePoint to Online and have noticed that the ribbontabselected event isn't working. The following JS code works fine in on-premise: $(document).on('ribbontabselected', ...
0
votes
0answers
21 views

How to Create Color Indicator in Column sharePoint List

I have sharepoint list with clasic view mode. in that list I have: Task Name, PC Name, Planned Start Date, Planned Due Date, Actual Start Date, Actual Completion Date, Alert Zone. Alert Zone consists ...
0
votes
0answers
18 views

SharePoint Custom List - Column Tooltip to Transparent

I hope someone can help. I am currently using the following snippet to remove the automated tooltip from ms-input and ms-long ms-spellcheck-true custom list column input fields: $(document).ready(...
1
vote
1answer
26 views

How to assign an ID or Class to specific Webpart in Sharepoint

I’m working with Sharepoint on a client project and I’m finding it a bit cumbersome to navigate. I see that Sharepoint seems to generate dynamic ID names for its web parts when they are created; an ...
0
votes
1answer
22 views

How to query SharePoint items that contain one or more text values CAML?

I want to query for SharePoint items that contain at least one or more specified texts. For example, I have a field called "Pets." A SharePoint item would have a value that looks something ...
0
votes
0answers
46 views

Sharepoint and Microsoft Teams can't Preview HTML file in HTML File Viewer

I have some small HTML files (containing interactive data visualizations made in R/Python). They can't be published online but I thought I could upload them to Sharepoint/Teams and preview them in the ...
0
votes
0answers
25 views

How to use Anchor tag in SharePoint Custom Navigation

I have a custom master page and I need one of the nav items to link to a section on the same page. <section class="mt-3 pt-4 pb-5 grey lighten-4" id="cyberHeroes"> &...
0
votes
1answer
27 views

AJAX POST Call to More Than One SharePoint List

I have been working on a project for quite some time now. I have found this post somewhat useful, but am unsure if it is correct or not for my utilization. Functionality: Read in SharePoint list ...
0
votes
0answers
20 views

SharePoint 2013 custom JS not working in IE11 list view

I seem to have some browser compatibility issue but not sure what is causing the issue. I wrote my code using Chrome and buttons, Javascript, etc. runs good. Everything displays as it should. I'm ...
0
votes
1answer
37 views

Sharepoint list last modified date

I use this code to get the date of the last edit of a certain list. Now I want to loop through the listitems and identify the item that was changed last, so i.e. that has the same date as the ...
0
votes
0answers
12 views

Put dynamic javascript content on SharePoint main page

I am new to SharePoint and I would like to put some data retrieved dynamically with javascript and angularjs onto a portion of a SP page. The arrow in the below image shows where I would like to put ...
0
votes
1answer
42 views

Removing Name from News Web Part

I am using News web part on a modern page. I add a new News and I see it on my home page. But I don't want my name to appear. It has my new News but it has my name and date that I created the News. ...
0
votes
1answer
21 views

ExecuteQueryAsync and Promises

I've been reading a lot of these posts to try and figure things out but still have some questions. The sequence of events is Edit screen displays, user enters data, and submits(I have omitted that ...
0
votes
1answer
52 views

SharePoint 2013 SPServices UpdateListItems 403 FORBIDDEN

I have been using the SPServices UpdateListItems code below for several years on an on-premise SharePoint 2013 Enterprise server without any issue. However, we recently migrated to a new cloud-based ...
0
votes
0answers
11 views

CHange colum header(Display Name) in SharePoint List view

Added list view in a web part page and tried to change column header(column name) using below script but it didn't work out. Reason is column id is keep changing because of the sorting number. Can ...
0
votes
0answers
10 views

SP2013 Using Promises (synchronously) on List Item

First, let me start by saying thanks and I am new to this. I have two lists and for sake of argument I'll call them src and target. I need to get field information from src, place some of it into the ...
0
votes
1answer
26 views

How to fetch data from _vti_bin/listdata.svc using node js

I'm having some trouble figuring out how to get data from the _vti_bin/listdata.svc on my sharepoint online site. Essentially I am trying to fetch the data in this listdata.svc file to then insert it ...
0
votes
0answers
26 views

Sharepoint to PDF

I am trying to convert a sharepoint list item to a PDF using a button but I have some questions related to the script: ....< h2 > invoice < /h2 > ....< div >" & invoicefill....
0
votes
1answer
11 views

_x0020_ Not Working in AJAX

so I have 8 different SharePoint lists I am pulling from. And for aesthetic purposes I want to change the listname from something like "Program1" to "Program 1" as it doesn't ...
0
votes
0answers
14 views

HTML Form Doesn't Send Data through AJAX Post

I have a DataTable that uses AJAX to pull from 8 different SharePoint lists, and organizes them based on there Program attribute, then child row is organized by the Deliverable attribute, followed by ...
0
votes
0answers
11 views

How to stop page refresh after submit to a survey?

I added a survey (data view) web part to one of my pages and then I added another survey web part to the page that shows the results in a graphical summary I have hidden this web part. I want the ...

1
2 3 4 5
104