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

CAML Query with multiple properties

I want to use CAML query to delete elements from a SharePoint list. Right now it deletes element if they have a specific text in their title: camlQuery.set_viewXml('<View><Query><...
1
vote
2answers
20 views

Deleting element from list using CAML Query not working (deleteObject of undefined)

I want to delete a list element using CAML Query. The element has the value 55 in the column CorrespondingListID. This is the function I use: deleteFromHistory: function(){ console.log("...
0
votes
1answer
25 views

Can't get Organization Name from AD

Good day, I have a question with getting user profile data from AD by JavaScript for SharePoint Display Form. I can get user Department by script: <SharePoint:ScriptLink ID="ScriptLink2" name="SP....
0
votes
1answer
19 views

Deleting SharePoint List elements with specific values in a column

I'm a bit stuck right now. Using JavaScript I wrote a function that deletes an element from a list with a specific ID: deleteItem: function() { let siteUrl = 'mysite'; let clientContext = new SP....
0
votes
1answer
12 views

Get all videos in a library to embed in page using JavaScript

I have a video library in SharePoint 2013 and want to embed those videos in a publishing page on another site collection using JavaScript. The videos should be in a special order defined by a column "...
0
votes
0answers
10 views

Access to Sharepoint 2019 OnPrem Web Services using NodeJS app

In my company, I/T has just set up a new Sharepoint 2019 OnPromise, that is hybrid, using Azure AD for authentication. I'm a site collection admin for my Sharepoint website. Let's say the URL to ...
0
votes
1answer
32 views

REST api call using method getbyemail for user in a group returns error “Cannot find resource for the request getbytitle”

Users exist in sharepoint group: If I do simple GET request in browser: https://mycompany.sharepoint.com/sites/testsite2/_api/web/sitegroups/getbytitle('TestGroup')/users/getbyemail('john.theuser@...
1
vote
1answer
14 views

Image with Embedded Links

I have a image. In the image I have boxes that if a user clicks it would open another page. In SharePoint 2013 I could use a visio diagram and link the box to the other pages in the image. How can ...
0
votes
0answers
13 views

Seek operation error when uploading a file using REST

I am attempting to upload a text file to a SharePoint 2016 document library. The text file contains a single-line string that represents JSON data: {"User": "JANE A DOE","AssignedTo": "JDOE","...
1
vote
1answer
21 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 ...
0
votes
0answers
10 views

Retrieving Recurring Data

I am trying to retrieving recurring data from a SharePoint 2016 calendar. After about a month I realized that recurring data isn't being retrieved. Any ideas how I can accomplish this? I am using ...
0
votes
0answers
12 views

Add More Tiles to Hero Web Part

I created a Hero web part in SharePoint 2019. I am using five tiles that have a big tile on the left and 4 cluster on the right. I will like to add 2 more tiles to the 4 cluster tiles on the right ...
0
votes
1answer
15 views

Get SharePoint user ID from name or email using JavaScript

I am building a JavaScript web part that queries a SharePoint list and generates a report based on the list data. I want to be able to get the user ID for a given user by their name or email. input - ...
1
vote
1answer
27 views

Break inheritance SharePoint list item using JavaScript

below is my script to break inheritance of a list item in SharePoint. I am facing the following issue. I have a form, where users submits request through it. All users are in a group called Site ...
0
votes
1answer
15 views

Problem with PreSaveItem

I have some code in my PreSaveItem event that checks to see if there is a conflict on the calendar with the item being created. The code itself executes just fine and properly checks the calendar for ...
0
votes
1answer
23 views

Make a SharePoint page that shows (REST GET) links and presents the results

Is it possible even for a SharePoint noob like me to make up a page with many links (which only return a simple JSON result like true or false) and show the result of the clicked link on the same page ...
0
votes
0answers
8 views

Timing of term/ taxonomy calls (smh!)

We are using client side javascript to get navigation terms from the term store and their manage navigation friendly urls as well as some custom properties for how the navigation behaves. This is the ...
0
votes
1answer
18 views

SharePoint 2016 On-Premises: Retrieving and Comparing Items using jQuery

I am trying to catch double booking when people create events on a calendar in SharePoint 2016. Using the PreSaveAction function, I want to retrieve the current item being created and then do a for ...
0
votes
0answers
10 views

Is it possible to change the function of the 'Cancel' button when an item is shown in EditForm.aspx?…printit=true

We have a form that users can print by clicking on a Print button. After clicking on that, the item opens in a new tab and looks like this with the the link in this form: sharepointsite/Lists/Request/...
0
votes
0answers
31 views

Filter SharePoint Page based on a User's Logged with javascript [duplicate]

In my company's Sharepoint website, each user account includes Display Name (LastName, FirstName and Initial). I need a selective View based on the User's name. I'm not using People Picker, so I can'...
0
votes
3answers
43 views

How to count number of days from SharePoint list?

How to count number of days between two dates from SharePoint list using CAML query/JavaScript? Thanks
0
votes
1answer
16 views

400 Bad request when filtering data using the autogenerated ID column

Been hitting my head and have no idea what I am doing wrong. I have couple columns in a list and I want to update the Column field by choosing the ID field. Below is the URL that I generate but throws ...
2
votes
1answer
29 views

Open Manage Access and Permissions Panels via JavaScript in Modern SharePoint Online

Is it possible to open the "Manage Access" Panel for a List Item or the advanced "Permissions" Panel to share the site in modern SharePoint Online (Modern Page/List etc.) with JS? I know it can be ...
0
votes
0answers
13 views

Delay SharePoint search hover box

I am trying to wait for 2 secs before the hover panel will show on the search. I can see that : ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, ...
0
votes
0answers
19 views

Hover Panel - Delete Document in SharePoint Search

I have added a delete document button on the hover panel within the footer and that works ok , no problems. I then need to execute some JSOM, so when the button is pressed and delete file JSOM is ...
0
votes
1answer
21 views

How to do an if/then in to handle if a Parameter isn't being passed to the api

I have a SharePoint 2016 page that expects a parameter and dynamically builds the url for the API call based on that parameter. But, I'm struggling with what/how to do an if/then in my ajax to handle ...
1
vote
2answers
147 views

What is the best practice for getting JS and CSS files into a SharePoint Modern Page? [closed]

I'm looking for the best way to include JS and CSS files into a SharePoint Modern page, which can be done once across a number of pages. At the moment I've got the Script Editor web part to include my ...
1
vote
1answer
31 views

Why is my SharePoint script only working for me?

I have full control permission levels over my department's SharepPoint 2013 team site. I have inserted a jquery in a script editor web part located in my list's New Form. It works perfectly for me ...
0
votes
1answer
16 views

Adding object values to the correct SharePoint list columns---getting blank SharePoint rows

I'm parsing an Excel file and it's coming back as an array object. I want to add each object value into the correct SharePoint list column. I'm using POST to upload to info and the data is going ...
1
vote
1answer
34 views

How do I append an Image in the DOM from a list using EncodedAbsUrl

I have 2 lists with 5 columns; one has Title, Question, Attorneys, ID, and attorneyPic. This last one is looking into an image list. I created a webpart for this so the the actual webpart looks like ...
1
vote
1answer
38 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 ...
0
votes
0answers
12 views

Change Caml Query View/Filter using javascript button without reloading page

I have a script to pull a custom list using caml query, push it to html and format it with css to appear as a blog preview on our sharepoint homepage. When adding items to the list, users have the ...
1
vote
2answers
30 views

SharePoint Add-In, can't find “Style Library”? Language Issue

I have an Add-In that works fine to install in an English setup of SharePoint. However, when I test this in another language I run into an issue. The issue is with this code: var list = web....
0
votes
0answers
21 views

SharePoint - PreSaveAction function problems

I have a jquery control that i developed with JSLink. If I save the form the contents of the list item disappears. So I have created a PreSaveAction function in jquery that at the moment copies ...
1
vote
1answer
21 views

How to convert binary image data retrieved through REST /$value to be used in docx.js?

I'm trying to pull an image from a SharePoint library using REST, construct a Word document using docx.js, insert the image, then save that document back to another SharePoint library. I have code ...
2
votes
1answer
33 views

Change sitefeed webpart title

Platform: SharePoint 2016 I added a sitefeed webpart to a sharepoint page and it has a default title of Newsfeed. I tried changing the title to something else but I get an error that says Unable ...
0
votes
0answers
35 views

How to display upcoming events of calendar in SharePoint 2013 using jQuery?

The requirement is to display upcoming events(at least 3)from a SharePoint Calendar on the home page using jQuery/Javascript. I'm using SharePoint Designer 2013. Please let me know for further ...
0
votes
0answers
25 views

How to insert text in JavaScript array that pulls SharePoint list fields

I am utilizing a script to group a SharePoint List form items into tabs. My issue is that I need to be able to add text to one of the tabs, or under certain fields, but I haven't been able to figure ...
1
vote
2answers
39 views

How to Upload Large Files onto SharePoint using REST API and JQuery

I'm developing a web application built on top of SharePoint 2013 using HTML, JavaScript and JQuery but I'm having trouble trying to figure out how I can upload large files onto a SharePoint Document ...
0
votes
1answer
24 views

Setting background color in Calendar web part using javascript

I am trying to set the background color of Calendar overlay using javascript. I can set them using a static css file, but I would like to do that via javascript, based on certain conditions. var ...
1
vote
1answer
35 views

Is it possible to use a SharePoint login session from JavaScript?

I would like to make an HTTP GET Request using the SharePoint REST API and I would also like to invoke the API based on the fact that my browser is already logged in, so I do not need to explicitly ...
0
votes
2answers
58 views

Show Uploading Percentage status in loader

I have a question about uploading file via PnP JS SPFx in SharePoint online. I had successfully uploaded files via PnP JS. After that, I need to show uploading percentage. Same requirement, using ...
1
vote
1answer
80 views

Getting ID for a list item with JS

I am trying to set up a simple subscription tool where users can subscribe to or unsubscribe from various distribution list. The idea is that you select a user through a people picker ('subuser'), ...
1
vote
1answer
24 views

How to create a SharePoint content type with 'Document' as the parent

I am trying to use SharePoint REST to create a content type. I intended the content type to use the 'Document' as its parent (0x0101). But every time I tried the code, it creates a content type with '...
1
vote
0answers
34 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 ...
0
votes
1answer
47 views

Navigation with megamenu in SharePoint 2016

I successfully created a mock-up navigation menu with a mega menu item (Directorate) in codepen, but it isn't working as I would hope. When I try to implement it in my SharePoint site, this is what I ...
0
votes
1answer
48 views

Arrange Checkbox and Radio button from vertical to horizontal alignment on new form on SharePoint online list

We have multiple checkbox & radio buttons columns on our SharePoint online list form. We want to change the display of all checkbox & radio button horizontally. We tried below script, but ...
0
votes
2answers
24 views

SharePoint 2016 modal popup undefined error

Platform: SharePoint 2016 I am trying to use SharePoint's pop-up modal in SharePoint 2016 but it worked once and after a few minutes it stopped. I get the following error 'OpenPopUpPageWithTitle' is ...
1
vote
1answer
22 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?
1
vote
1answer
39 views

Read Comments in Tasks via JavaScript

I am trying to read the comments of a task list in SharePoint 2016 by using JavaScript. Right now I get the latest comment using: var comment = oListItem.get_item('Comments'); But how can I read ...

1
2 3 4 5
101