Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
5 views

Can I use libman with my SharePoint Add-In project?

I've noticed that libman is only available in Visual Studio 2017 asp.net projects. However, SharePoint Online Add-In projects are also web projects and use lots of javascript libraries. Is there any ...
0
votes
2answers
25 views

Why the AJAX function is only executed in the end?

I've this code below: jQuery(document).ready(function() { jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/OfertaParticulares/_api/web/folders('Dinamico')/...
1
vote
2answers
943 views
0
votes
1answer
21 views

Displaying List Item in CEWP on another Page

I have a SharePoint with several calendars named for their store number, I also have a list named Store Addresses which has the store numbers and their addresses. I am trying to display the address ...
0
votes
2answers
15 views

Data from Sharepoint REST API is returning undefined

I've this code below: jQuery(document).ready(function() { jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/folders('Historico')/folders?$...
0
votes
1answer
39 views

I need to create a layout like the one attached in Javascript [on hold]

$.ajax({ url: "http://bc-net/Sandbox/juandev/_api/web/lists/GetByTitle('Qlinks')/items", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (...
2
votes
4answers
49 views

How do I change link/url for text “SharePoint” in the top bar

I am working with SPOnline and trying to see if there is a way to change link/url when users click on SharePoint in top bar. See below screenshot. I believe it has to be done at master page level, ...
0
votes
1answer
1k views

how to change Sharepoint 2013 Default Sign-in Page and create Custom Page (normal.aspx) which redirects users to Http handler(test.ashx page)

Sharepoint Default Sign In page should redirect to my Custom HTTP Handler test.ashx code. I configured multiple claim authentication in sharepoint server 2013 and I need to by pass multiple ...
2
votes
2answers
68 views

Custom 'Open in explorer' Button

I'm trying to add a custom 'Open in Explorer' button to the page using Content Editor Web Part. This is the code I've found and tried with no success: <a href='#' onClick="javascript:CoreInvoke('...
3
votes
1answer
176 views

Warning Pop-Up Window Before Saving

I do not know which way to turn. The scenario is that I have created a SharePoint List with a InfoPath form attached to the list. There are numerous individuals that will be touching the form per ...
0
votes
1answer
24 views

Using deferred promise when retrieving share point list data

I am creating a SharePoint online application and I need to retrieve information from various lists. To do this I'm sure i need to use a deferred promise so as all the functions can execute. Below is ...
1
vote
1answer
952 views

SharePoint 2010 Javascript JSOM creating a List View Web Part using javascript

I was able to follow along and add a Content Editor web part to a page using javascript from MSDN here. I am now interested in trying to find a way to add a List View or Data View web part to a page ...
1
vote
2answers
1k views

Copying all the field's value of a list to other list using javascript

This JavaScript code copies title field of one list to other list. <script type="text/javascript"> ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "sp.js"); var siteUrl = 'url'; ...
0
votes
1answer
43 views

Why is my loop not iterating?

I have a blog list (SP2016) which I am using to display news items. On the blog list I have a workflow which sets the Created by(Author) field to system account. for a better ux I am capturing the ...
0
votes
1answer
23 views

JS script only throws error when used in SharePoint in Internet Explorer 11

I'm experiencing this strange issue. I have a basic valid javascript app (Vue.js + Vuetify framework) which works fine in any browser (without SharePoint, so run from any hosted environment). Next I ...
1
vote
1answer
30 views

Show the SubFolders in DIV using Sharepoint REST API

I have this code bellow: jQuery.ajax({ url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/Folders('Historico')/Folders", method: "GET", ...
3
votes
1answer
1k views

How can I get an image map to highlight various parts with mouse hover?

I am using SharePoint 2010 and I'm trying to use javascript and html to create an image map that highlights different sections of the image depending on where the cursor hovers over. In this case I'm ...
0
votes
0answers
9 views

Optimize Retrieval of Multiple Lists

The below code snipped retrieves all items within each list in a subsite. Then filters by list title so that only information from lists containing "RDTEN" or "procurement" in their title get parsed. ...
1
vote
1answer
18 views

How to update SPO task list in case of below requirements

I am working with SharePoint online Task List for one of the implementations. Below is the screenshot of the same. I am using Below JS Snippet to highlight the tasks in Yellow for which the Due date ...
0
votes
1answer
18 views

Call JavaScript dynamically on Visual Web Part

I currently have a visual web part that displays clocks from different time zones, using the jClocksGMT library as provided here in the .ascx file. However, instead of hardcoding the timezones I want ...
4
votes
1answer
2k views

How to retrieve webpart xml-definition programatically

I have a Custom Webpart deployed in the Site, to which I need to retrieve the XML definition programmatically using Client side object model, can anybody help? EDIT: I used the following code. ...
0
votes
1answer
1k views

Add a “add Link” to a Content Editor Web part

I have used a Content Editor web part to display a scroll-down list of links. The code I use is similar to this: <select id="mySelect" jquery110205452414735412181="1" ...
0
votes
2answers
26 views

SharePoint List Query fails with error “Request failed, cannot complete this action”

I'm trying to query a SharePoint list on my root site collection but keep getting the error "Request failed, cannot complete this action". I messed around with the CAML query below and have figured ...
1
vote
1answer
38 views

Limit edit in SharePoint List to only 3 Items per user

I need to limit the possibility per user to be able to edit 3 drop down value items from the quick edit mode option in a SharePoint list(when pressing "edit this list" that is next to the new item ...
0
votes
1answer
29 views

Adding a Dynamic calculated field in SharePoint Edit Form View

I am looking to add a dynamic field in my Edit Form since calculated fields do not show on the Edit View mode. Using the Hillbilly format, I created a table... HTML <tr> &...
1
vote
1answer
1k views

Sharepoint GetUserProfilePropertyFor not returning any results

I am trying to get the SharePoint 2013 API for GetUserProfileProperty, when I put the below url into a browser it works finr, however when i run the below code, I get no result (I do get a return, but ...
3
votes
1answer
42 views

SharePoint List to HTML Table to TableExport.js

I'm using the TableExport.js API and PNP.js to pull data from a SharePoint list and display it on a Webpage and then have the options to export it into a Excel/CSV/Txt file. Homepage: Shows the ...
0
votes
1answer
20 views

REST 500 error on list item

I have a REST request pointing to a list in which I am getting the items. I am using the the _spPageContextInfo.webAbsoluteUrl +'/_api/' then tagging the path on the end. This list is in the same ...
1
vote
2answers
1k views

SharePoint List - Color on cell text menu

I have a SharePoint list where I have code to change color on a cell based on the field. It works but when I change to the second page of the list, the code does not work. First page : Second page : ...
0
votes
1answer
17 views

Rest API to display SharePoint list items on Webpage

I'm using the Rest API to pull in data from a SharePoint list and display the results on a webpage. How would I be able to target those two array items? All I'm receiving back in [object Object] [ ...
0
votes
3answers
1k views

How to encode spaces in sharepoint 2013 search rest api url?

In a sharepoint 2013 search rest url, I have multiple columns to filter on, but some of the values have spaces, but it seems spaces are used to delimit the filters. How can I encode spaces? See this ...
1
vote
1answer
1k views

SharePoint 2013 Timeline Coloring

I want to color a timeline with data of a specific column. This column is named Topic. So I wrote some code and added it to my SharePoint site but it didn't work. Here's the code I used: var ...
1
vote
1answer
1k views

disable people picker 2010

I am using following "code" to disable people picker in custom edit form: $("div[id$='_UserField_upLevelDiv']").attr("contentEditable",false);//Disabling People picker $("span[id$='_UserField']")....
1
vote
3answers
1k views

Add javascript in master page sharepoint 2013 using wsp solution file

I added user control and then empty module to reference user control inside SharePoint 2013 master page but it is not working. Control Id="AdditionalPageHead" Sequence="150" ControlSrc="~/...
1
vote
2answers
317 views

How do I get results to open in new tab?

I've made several edits to this line, but they do not appear to be working. html = html + "< a href='" + this.LinkingUrl + target="_blank"+"'>" + this.Name $.ajax({ url: "https://gumdropsgc....
1
vote
2answers
1k views

Use javascript/jquery to see if items in list are due soon in Sharepoint 2013

I am trying to determine by date if an item is due. In my use case, my user will create an item with a date in the following format (MM/DD or 06/15). Now if the date the user chooses will fall in the ...
0
votes
1answer
1k views

Get data from multiple lists using REST API

My requirement is: To pass listnames as an array to a method and concatenate the result after each success. The problem is I'm not able to concatenate the result from the previous ajax call ...
0
votes
0answers
16 views

Create Page .aspx in a list using SP REST API [duplicate]

I've this code below: var fields = { "__metadata": { 'type': "SP.Data.PagesItem"}, "Title": "test" } jQuery.ajax({ url: "https://.../sites/intranet/jobs/_api/web/lists/GetByTitle('Pages')/...
1
vote
2answers
1k views

Set Content Type of New List Item Using JSOM

I am trying to add folders to a library using JSOM. I need to set the content type of the new library items, however I am not finding the documentation on how to do that anywhere. var itemCreateInfo ...
4
votes
0answers
48 views

Get SubFolders using Sharepoint REST API and show them in HTML DIV

I want to retrieve Subfolders using SP REST API and check if there is any created folder and If it exists, display HTML content like: <label>SubFolder Title</label> for each SubFolder. All ...
0
votes
2answers
20 views

Redirect to Previous Page after Form submit

Looking to redirect to the Previous Page after a Sharepoint form submit. People will be coming to this form from different departments and want to redirect based on their previous page. I see the ?...
0
votes
1answer
26 views

Upload attachment to List Item using React & Axios (REST API)

Well the title pretty much sums it up. I've got a custom form outside of sharepoint that creates/updates/views items from a sharepoint list using Rest API (with accessToken). Now i need to be able ...
1
vote
3answers
2k views

Unable to set value of dropdown on page load

I am using SharePoint 2013 online and I have created a form for my list using Infopath 2013. It has a combination of text fields and dropdowns. I am able to set the default value of text field using ...
0
votes
1answer
47 views

Export sharepoint list items to excel by passing item ID as parameter using javascript

I have multiple filters on the page which gives me results, My objective is to provide an export link somewhere on the page which should have url with Id(s) as the parameter, thru which user can ...
0
votes
1answer
1k views

How to Sign-In with Sharepoint from the Javascript?

I used the following code to access the sharepoint from javascript var soapDataString = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/...
0
votes
1answer
1k views

How to Import Excel/Spreadsheet into an existing Sharepoint List using Javascript

I would like import some data of an excel sheet to existing list. I see that this can be done using power shell or by using C#. Can somebody help me in doing this using JavaScript by adding a web ...
8
votes
1answer
267 views

Retrive & Display a PDF document from SharePoint Document Library to a html canvas using Javascript

In SharePoint hosted App I need to get a specific PDF document from SharePoint Document Library & display its 1st page to a HTML canvas using JavaScript. For that, I tried to retrieve the PDF ...
2
votes
2answers
95 views

SharePoint Randomly Adding Code nbsp

So just now, I had a bug in my site that caused my custom navigation bar's buttons to be sized and spaced incorrectly. I had no idea where this bug came from, and had to search around for awhile to ...
0
votes
1answer
5k views

SPService GetListItems with CAML : can't get the example to work with status giving error

I am new to SPServices and trying start with example GetListItems. Below is my code $(document).ready(function() { GetTasks(); }); function GetTasks() { var method = "GetListItems"; ...
2
votes
2answers
1k views

Prerender executing twice

I have some prerender code that is being used to get information from another list to add into the display of the main list. I am puzzled - the prerender code executes twice. (function () { var ...