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
1answer
18 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
25 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
14 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
8 views

i need JavaScript to check a column uniqueness in the list and if column is unique start sequence column with number as 1 [closed]

i need JavaScript to check a column uniqueness in the list and if column is unique start sequence column with number as 1 Eg: Column A (Work order number) is entered with a value then script ...
0
votes
0answers
19 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
14 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
20 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
0answers
24 views

SP Online - Hide share/sync and other OOTB buttons on modern list view command bar

I want to hide the 'Out of the Box' (OOTB) buttons on list view command bar at root folder level only. At sub folder level, I want to toggle show/hide buttons based on selected items/folders. I know ...
0
votes
1answer
20 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
32 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
20 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
25 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
18 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
34 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
39 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
16 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
44 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
24 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
25 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
9 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 ...
0
votes
0answers
8 views

SQL case in a variable - syntax error

How can we pass SQL case using a variable in JS? We are using below code but getting syntax error: var sql = " update tableName set attribute1 = (select attribute1 from tableName where attribute2 ...
0
votes
1answer
32 views

list formatting in SharePoint not working

list formatting in SharePoint I am trying to create a view using view formatting by trying the below https://github.com/pnp/sp-dev-list-formatting/blob/master/view-samples/tile-layout-example-with-...
1
vote
1answer
19 views

Hide Survey Time Created & Number of Responses

Hi, I am very new to SharePoint. I do not have any coding background. I created a survey as shown in the photo. However, I am trying to hide the two columns: Time Created Number of Responses ...
0
votes
0answers
13 views

popUp in SharePoint using localstorage inconsistent behavior

The code below renders a pop-up once a day for every user that logs into the SharePoint site. It was used in our SharePoint 2010 site for years and worked perfectly. Recently, we migrated from 2010 ...
1
vote
1answer
44 views

CAMLQuery is not rendering title item from the list

Here is the list (please note 'Full Name' column has been changed to 'FullName' since I took this shot: Here is the CAMLQuery: $(document).ready(function() { var camlQuery = "<View>&...
0
votes
0answers
28 views

SharePoint 2019 On Premise - Open app launcher items in new window or tab

I am looking to achieve this in some sort of script. I am not sure how to do this as I am new to SP2019. The app launcher forces all items (including custom tiles) to open in the SP window. I know I ...
0
votes
0answers
8 views

Create content type with fields with javascript

I would like to implement the following steps with java script and the rest api. Create content type Add fields to a content type Create list and assign the created content type to it I have found ...
0
votes
1answer
21 views

PnP Provisioning templates in PnP Js

XML-based PnP Provisioning templates are available to be consumed via SharePoint PnP PowerShell. Question: Is there something similar for provisioning lists via JavaScript/TypeScript via pre-created ...
0
votes
3answers
32 views

Hide drop down value based on selection of another drop down

Please suggest if below works as i want to hide a drop down value based on other drop down value selection , but it is not working as expected. var dropdown1 = $(":input[title='Engagement Type']&...
1
vote
1answer
20 views

Rest API show items if current log in user equal me

I have two user column in SharePoint 2013 RequestedFor and CC. I want to display items only if the user in either column is equal current log in user. So far I'm able to display items when Requested ...
0
votes
1answer
30 views

Create List Item with JavaScript

Attempting to create a list item in an SP13 list using Javascript. The JavaScript code is shown below. When I click the button on the page the code runs up to the set_item statement and then just ...
0
votes
0answers
21 views

spjs-utility.js not compatible with SharePoint 2016 list referecne error

I am on a project where we just migrated from SharePoint 2010 to 2016. In 2010, we had a blog that used a rating system and also had a custom hit counter that captured how many unique times a blog ...
0
votes
1answer
18 views

Allow list views based on getting a users group via a Get User

Is there away to hide views based on a usergroup using JavaScript? At first we had one List and created views for each section. Now we only want the individual views shown only if a visitor belongs ...
0
votes
1answer
39 views

Not able retrieve web or list using Javascript

I have added the below code, But I am not able to retrieve the web or site. And added this script in Content editor web part of list. Can you please let me know where did I go wrong? $(document)....
0
votes
1answer
20 views

Dynamic list navigation linking abnormally

I created a dynamic horizontal navigation menu that gets its data from SharePoint lists. It renders and works great but I am dealing with a situation that is very abnormal. The items in the ...
2
votes
2answers
98 views

Create Site Page via REST API

I would like to create a Site Page via REST API with my own Title and Content. So far I tried to send a POST request but got an error: To add an item to a document library, use SPFileCollection.Add() ...
0
votes
1answer
37 views

Autofill people/Group field

Is there a way to auto-fill people/group field based on a drop down choice for new form? For example, when the user select Choice A, people/group field would automatically fill in "Group A". ...
0
votes
0answers
8 views

Explanation on this.Init within the JS Grid Events example

Prev Question Link: Sharepoint 2013: Can you control the input of a Datasheet View? I had previously asked a question on being able to manipulate the information within a Datasheet view and was ...
0
votes
0answers
12 views

Enable Asynchronous Automatic Refresh removes js to highlight backgound colors

When SharePoint page refreshes the custom highlight fields work, when the webpart is refreshed highlight disappears, if I refresh the page then I can see highlighted background again,the page needs ...
0
votes
1answer
36 views

Call external API from SharePoint online using javascript

I am having HTML file for user input and use REST API for update into SharePoint list. we have a requirement to get value from external API. I am able run the below script from normal HTML form, and ...
0
votes
0answers
19 views

SharePoint Modern Templates Without 365

Microsoft gives a lot of choices using 365 so I'm having trouble finding prebuilt out modern templates to use for my server side version of SharePoint 2016. I don't have the time to create a new site....
0
votes
0answers
21 views

function not getting called onkeypress event of the input element

I am trying to allow only numeric input in a textbox...For this I am writing a code as follows: '<input type="text" id="txtFlexibility" class="form-control input-sm" ...
0
votes
1answer
21 views

How to pad a number with leading zeroes using No javascript framework version in SPFx webpart?

As I am new to Sharepoint Framework, I am trying to generate request ID for the request form using the pad function for adding leading laeding zeroes using No javascript framework version in SPFx ...
0
votes
1answer
45 views

CSR color coding row of list not showing correctly when list is filtered

Before i show my code, let me give some background. I am using JSLink in the webpart of the list. I have MDS disabled for the site. my javascript file is located in my root sitecollection in Style ...
0
votes
1answer
26 views

Edit Form read only to submitter

I would like to make the edit from disabled/ read only to submitter after they have submit the item. Is there a way to do so? I've tried setting workflow to "View Only" for people/ picker ...

1
2 3 4 5
104