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
23 views

PnP js call returns “Item does not exist”

I'm running a small code to upload file in a SharePoint 2016 document library and to change a metadata. Sometimes (but really often) my code returns error "Error making HttpClient request in ...
0
votes
1answer
14 views

Add jquery reference to JSlink file

I am using JSLink feature of SharePoint 2013, My JSLink file has code to get current user id and other details, for this I need to add reference of jQuery file. I tried adding those files in in ...
0
votes
3answers
37 views

SharePoint online add link to a document library on new list item

starting to use SharePoint online and I am loving it so far. However I need some guidance (if anyone can guide me by giving me material where to look at). Basically I want to modify the ItemAdded ...
1
vote
1answer
32 views

Color Coding List Item by Web Part based on value

I am currently trying to get color coding on a list to highlight good medium and bad properties. I have tried to follow the examples shown here for color coding: SharePoint 2013 Client Side Rendering:...
1
vote
1answer
54 views
+50

Register Custom Action with Javascript

I am having difficulty registering a custom user action through JavaScript. I am using the following code example. The code executes without any error however the button fails to appear on the Ribbon. ...
0
votes
1answer
10 views

Javascript issue in Chrome with AddAnApp.aspx

I have created a piece of code which will check if your on addanapp.aspx page and if so it will read your permissions on a list and if you have EditList perms it shows 'Custom List' app only on add an ...
0
votes
0answers
13 views

Open built-in “Manage Access” dialog from javascript

SharePoint Online has a few nice dialogs such as "Manage Access" for a specific document. If you select "Share" for document you get this dialog: You can select "Manage Access" and get this nice ...
0
votes
1answer
38 views

JavaScript in SharePoint Online

I was wondering how i would go about implementing JS into my SharePoint online master page. Is the best way to have a separate file with JS functions that is stored in the site contents and then ...
0
votes
3answers
27 views

SharePoint forms: custom JavaScript or StratusForms? [closed]

Having just learned about Microsoft killing InfoPath support by 2023 and wanting to enhance my forms in quite a few ways not InfoPath cannot really offer, I just decided to migrate to another solution....
0
votes
1answer
41 views

expandable list of columns ( sharepoint 2013)

I have a list with too many columns (over 20 columns) and I would like to make some of these columns expandable to make the navigation easy for users. is it possible, knowing that I don't have ...
0
votes
0answers
19 views

How to ensure field is unique using JavaScript

I have two lists: List A - a workflow tasks list List B - an employees list containing fields such as employee name (person column), employee number (single line of text), etc. I have a workflow ...
0
votes
1answer
23 views

How to open up View Item from task list in SPO in a new tab

I am working with SPOnline Task list. Users click on View Item for a given task to go to the display form which by default opens in same window. Is there a way to open it up in a separate tab? ...
1
vote
1answer
19 views

Opening SP Document library upload Form on a button click using JS/JQ

I am working with SharePoint 2019 on prem. On one of the pages, I have content search web part added which shows documents results from a library as a search solution. On the same page, I am looking ...
0
votes
0answers
26 views

Clickable Hyperlink in the Input Mask SharePoint 2010

for a long time now I have been faced with an unsolvable challenge because I have no knowledge of js. I would like to add a field with a hyperlink to the input mask. This field with the hyperlink ...
0
votes
1answer
20 views

JSOM to alert users about not classified files

Due to the fact that I'm not able to use any powerapps, I'm limited to use javascript to achieve this goal. I want to send and alert or email to the user, letting them know that these files have been ...
0
votes
1answer
23 views

How to run AJAX call on page load and access that information from a custom webpart? [SharePoint Foundation 2013]

New to SharePoint development and not understanding how things work: I have a "directory search" custom webpart on my home page. It currently only works on the second search. I guess the AJAX call ...
1
vote
1answer
29 views

Change Width of text box in edit form

To improvement design of my app on sharepoint SP2013, I need change (in my case reduce) the width of text box of new form, how do it!? some idea?
0
votes
0answers
12 views

StratusForms Datepicker in Repeating Row

I'm using Mark Rackley's StratusForms 1.5. In his docs and other posts, he states that datepickers work in repeating rows. You can now execute code when repeating rows are added or removed, and ...
0
votes
1answer
19 views

Use REST API to get group SharePoint 2010

I have a group on my site - I want users to be able to add and remove themselves from this group via a button on a page. What is the URL I should be using as a parameter to retrieve the group and the ...
0
votes
0answers
15 views

Can I leverage the OOB Assigned To Email Notification functionality to send an email to the Created By user?

I have an Issues List with customization in SharePoint that I've chose to enable email notifications to the Assigned To person after the issue is assigned. I'd like to also send an email notification ...
0
votes
1answer
23 views

Start Workflow via JS gives error “Value cannot be null”

Hi I am attempting to start an SP 2010 workflow using Jquery SP Services but i seem to be getting a response 500 Value cannot be null. There is not supposed to be an initiation form yet when i ...
1
vote
2answers
63 views

How to get all properties of a Site Page using REST API?

I am writing an application in AngularJS for a SharePoint 2013 site collection, using the REST API to talk to SharePoint. My task is to update the Image Link in the Title Bar Properties of every Web ...
0
votes
3answers
35 views

Add list items to Object & Properties - javaScript

I'm trying to copy specific field data from list items to properties in an object, which appears to be working, however, I have multiple rows of data and the function is pasting the same row every ...
1
vote
2answers
29 views

Get the data from Multi line Text field and set it to text area line by line

I have a multi line rich text field and I want to get the data from column and set in text area line by line. I tried Splitting but I need another solution if possible.
0
votes
1answer
19 views

Sharepoint 2013: Moving a field o be side by side with another field doesn't save it

in an list/EditForm.aspx, I have the following code to copy/paste a field to another place: var dest = $('span[title="MyTitle"]').parents("tr:first"); // place to be copied var source = $("input[id*='...
0
votes
1answer
20 views

REST API or CSOM JS GetList return URL

I need to get url list, Title is ready, Title is not equals url. var clientContext = SP.ClientContext.get_current(); var website = clientContext.get_web(); var list = website.get_lists().getByTitle("...
0
votes
1answer
43 views

Javascript code inside my aspx page layout were smarter than i thought, and worked well on different regional settings and date format out of the box

I am working on an enterprise wiki site collection inside SP on-premises 2013. and inside the page layout i added this javascript, which get 2 date fields values from the current page (expirydate &...
0
votes
0answers
28 views

Document Open In IE

I have a pdf documents stored in SharePoint document library. By default the document open in Edge as the browswer is fine for some of the other documents in the library but the others I want to open ...
0
votes
1answer
24 views

Get Workflow Status Programmatically in SharePoint Using Client Side Object Model JavaScript

I am trying to monitor the status of workflows using JavaScript in the SharePoint Farm. List A: Number of Completed: In Progress: Error occurred: List B: ...
0
votes
0answers
17 views

Add validation to a Date field inside our publishing site's page layout using JavaScript/jQuery

I am working on an enterprise wiki site collection inside sharepoint farm 2013. I have a Date field named "ExpireDate" and i added it inside the EnterpriseWiki.aspx page layout. Here is the markup for ...
0
votes
1answer
25 views

How to set SharePoint list column font color using JavaScript

My question can be answered via two different ways: 1) How can I set the font on columns = white (to fake them being hidden)? I currently tried to use FieldName.fontcolor("white") and FieldName....
0
votes
0answers
13 views

Picture Library Slideshow Web Part Image Resize

So I have a folder with some images with the same dimensions and I am trying to have a slideshow in the homepage with these images. Everything is working fine except that there is a significant white ...
0
votes
1answer
22 views

Creating Custom WebPart — RangeErrror / TypError trying to access data from a file

Hi I'm new to using SharePoint and I'm trying to transfer over an Employee Directory Search app from a website to SharePoint Foundation 2013. I'm not able to use the same code in my .JS file and am ...
0
votes
1answer
36 views

Javacript as Webpart to change Content Types

I am not allowed to change the Content Type of a file using the Quick Edit. I was wondering if there is any JavaScript code that I can add as a Web Part to the document Library. This code should ...
0
votes
0answers
13 views

Include external script in display template

I'm creating a custom search result display template. I'd like to reference an EXTERNAL javasacript. The only examples I've seen copy the JS file into a library on the server and reference it from ...
0
votes
2answers
119 views

Get Page Field Values with javascript

We are using SP 2013 publishing features and have the document id service turned on for our site collection. So each new page has a document id assigned to it. We also created a custom content type ...
0
votes
1answer
8 views

ECB Menu “strAction” last value array

Created an Element in the ECB menu with dynamic items, when you try to access an item by clicking, the entire array is traversed and the last item is substituted, help the clicker to display the value ...
0
votes
2answers
28 views

CSOM Copy List Items

I was create Ribbon Custom Action, and try to copy list items selected to same list, but F12 error? what is the problem? function runCode() { var targetListItem; var values = SP.ListOperation....
0
votes
1answer
17 views

What are the required modifications in web.config in sharepoint site to expose URL to ajax call

I'm new to working with sharepoint. When i tried to call share point API url from ajax call in JavaScript. But, it's continuously failing and throws the error. I can say, that is CORS error. So, i've ...
0
votes
0answers
19 views

Accessing and counting from same list only works once

I've been trying to show a count subtracted from a maximum of 35 for a seating count. I've tried everything I can think of and have come to a dead end for myself. What am I doing wrong in my below ...
0
votes
2answers
27 views

How to chain promises for multiple ajax calls to SharePoint to get user ids?

Broken promises, thought I had it figured out, still trying to get reliable results. Console log shows hit and miss results. Below is the rundown of what I'm trying to achieve. Is there a simpler way ...
0
votes
1answer
23 views

CAML query to enable/disable custom ribbon button

I have a custom list and when the user open the list item Display form there is a custom ribbon. This ribbon should be enabled if the current user is a member of a particular Group. Here is the caml ...
0
votes
1answer
38 views

How to insert list items using JavaScript Object Model in SP

I am trying to insert list item's value through JavaScript object model in SP. When I call set_item('fieldname','Title'), it throw error "c.set_item is not a function". How to successfully Insert a ...
0
votes
0answers
26 views

Trying to get a File from OneDrive as PDF causes CORS error on redirect

I'm trying to get the content of a file as a pdf from Onedrive, however when getting the File via MSGraphClient, it just returns an error in the browser. MSGraphClient call:client.api(`/me/drive/...
1
vote
1answer
37 views

Create GUID for each item created or added to a list.Using JSOM

Trying to create a unique ID(not sequential which is preferably an alpha numeric unique ID) for each row item added. The same I have tried using an EXCEL formula, but how to integrate it with ...
0
votes
1answer
27 views

SPFx React webpart is not displaying all XML items from RSS News Feed

I am currently building an RSS News Feed in SPFx using React as a framework and using an XML link https://feeds.expressen.se/nyheter/ (Swedish news if curious). I can display all items, in this case ...
0
votes
1answer
46 views

validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again

I am working on 2 classic online team sites. one site is the root which contain the real list, and the other is acting as the infrastructure site which contain some custom scripts and pages which i am ...
0
votes
2answers
34 views

How to create a folder and a folder inside a folder using REST/JSOM/Flow in a Custom List (Not a library)?

The requirement is: When an item is created in a custom list, a folder should be created with the same name as Title of the item and the item should be placed inside the folder.
0
votes
0answers
23 views

javascript question

I have using the following code to disable editing of a list item if a user is part of a group, in my case WebHelpDesk Members When i use "Everyone except external users" instead of individual users, ...
0
votes
1answer
21 views

Change background image dynamically in IE

I'm trying to get a page to display different background image based on Holiday. When I used the DevTools in IE and pasted the following in #s4-workspace in css, nothing happened. But it worked when ...