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.

1,495 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
1 answer
330 views

Relative JS file reference from a custom page

I have HTML page inside a folder in style library called: Employee.html, so the link is: /style library/MyProject/Employee.html, I have also JS file inside the same folder called Employee.JS, I added ...
Julien Pierre's user avatar
2 votes
0 answers
656 views

Why is init.js using a synchronous XMLHttpRequest?

Newer version of the Chrome browser are shouting warnings when the XMLHttpRequest object is being used synchronously. We all know that we must not block the main UI thread with unnecessary synchronous ...
Carl in 't Veld's user avatar
2 votes
0 answers
186 views

How to exclude TaxonomyFieldControl from spell checker

I have a page layout with a couple of TaxonomyFieldControls on it. When I run the spell checker in the ribbon the taxonomy fields are getting flagged with spelling errors. I don't want the taxonomy ...
brennaman3's user avatar
2 votes
1 answer
161 views

Sharepoint 2010 get all list items from all lists with javascript

I want to get all list items from all lists in SharePoint 2010 with JavaScript. I always get the error: SCRIPT5022: The collection has not been initialized. It has not been requested or the ...
Paola's user avatar
  • 21
2 votes
2 answers
60 views

Is There A Way to Determine if More Than One Option in Custom Dropdown Field?

I have a custom dropdown choice field that is created using jQuery after a date is selected and a choice box is selected as "Yes." Here is that function: function queryEvents(date){ $('#...
Caola's user avatar
  • 133
2 votes
0 answers
712 views

unexpected response from server

I am using javascript to load data from list. But every now and then i get error Unexpected response from server Sometimes i get and sometimes i dont. I googled and someone suggested to free memory ...
Happy's user avatar
  • 513
2 votes
4 answers
3k views

Sp Services and calendar list

I have a SP Service call which uses GetListItems from a calendar list in SharePoint. I'm using it with the FullCalendar plugin. The events render fine that is not my question, my question is this: Is ...
BesaseB's user avatar
  • 21
2 votes
0 answers
531 views

People Picker in sharepoint 2010 in Client Object model

I want to implement a people picker functionality in sharepoint 2010 with Client Object Model (JSOM), how to do it? Actually i have implementated in 2013 but the same code does not work on 2010.
Pranav Bilurkar's user avatar
2 votes
2 answers
2k views

How to upload images to picture library using JavaScript?

I want to upload multiple images to picture library using JavaScript. I am building SharePoint hosted app. In which I have created a Picture Library in side Project Solution using Visual Studio and ...
Rahul Gokani's user avatar
  • 1,074
2 votes
1 answer
384 views

Difference between Publishing site and Team site while loading SP.JS

I would like to know what is the difference when loading SP.JS file in Publishing site and Team Site. SP.SOD.executeFunc('sp.runtime.js', 'SP.ClientContext', function () {}); SP.SOD.executeFunc('sp....
user2598808's user avatar
2 votes
0 answers
420 views

Add a reference to a JavaScript file in a custom action for a provider hosted app

I have a custom ribbon button in my app where I am trying to add logic to enable/disable the button based on whether or not the selected items are records. I am able to get the EnabledScript attribute ...
Alexander Burke's user avatar
2 votes
0 answers
204 views

Options for caching client-side requests?

Does Sharepoint 2013 offer any options for caching certain client-side requests for different clients (like ASP.NET cache)? I'm already using localStorage, but that only caches data for a single ...
Etheryte's user avatar
  • 361
2 votes
0 answers
525 views

How to execute a SQL Agent Job on a button click in a Web Part page of a SharePoint 2013 site?

I have a SharePoint 2013 on-premises site. The requirement is to add a button to one of the Webpart pages and on click of that button, a sequence of 3 consecutive SQL Server Agent jobs will be ...
Koushik's user avatar
  • 182
2 votes
1 answer
1k 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 ...
Justin's user avatar
  • 1,361
2 votes
1 answer
3k views

Error:Input string was not in a correct format. (Javascript)

I'm using SharePoint 2013 online and trying to save an item to a folder content type in a document library I think the code is nearly right but I am getting this error when I hit save button have ...
User8532787542's user avatar
2 votes
1 answer
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 ...
Michael Mayr's user avatar
2 votes
0 answers
118 views

New custom Create form does not auto complete “Owner“ field

I have an Issue Tracking list , and I have created a custom Create form using SharePoint designer , as follow:- The problem I am facing is that the owner field will not autocomplete the people & ...
John John's user avatar
2 votes
0 answers
197 views

Multilevel Audience Targeted Global Navigation SP2013

Has anyone set up Multilevel Audience Targeted Global Navigation SP2013? If I use term set I am unable to set security otherwise cannot set multilevel?
sandor's user avatar
  • 21
2 votes
0 answers
250 views

SP2013: Tabular view incompatible with JSLink checkboxes?

I'm using a JSLink file to replace a "Single line of text" column with a custom checkbox. For some reason, when "Allow individual item checkboxes" is enabled my checkbox won't work - I can't even ...
Omegacron's user avatar
  • 1,822
2 votes
1 answer
513 views

executeQueryAsync fail on Chrome

I am using SP.ClientContext (JS library) to update some item's fields. It is working fine on IE but on Chrome I get this error (displayed as alert): Request Failed, status code 0 text '' The ...
Nk SP's user avatar
  • 2,893
2 votes
0 answers
672 views

To Scroll to the top of page

I'm using angularjs & sharepoint 2013. I have implemented the SPA model in one page where the entire page refresh may not happen. Here, the scroll bar is not always going to the top of page since, ...
Anish V's user avatar
  • 623
2 votes
0 answers
479 views

Required Field Issue with SharePoint 2010 December 2013 CU

I installed SP2 a couple of weeks ago to fix the issues with my XSLT Compiles timing oot (Which was a Bug introduced in SP1). Things seemed fine, but then a few days later we noticed that workflows ...
RussGove's user avatar
  • 1,254
2 votes
1 answer
3k views

Show persistent status bar + form to update easily

I want to keep informed the end-users of my SharePoint site of any issue or relevant informations. Naturally, I would like to do so by filling HTML elements (input and select tags). Hence displaying a ...
Alex's user avatar
  • 327
2 votes
1 answer
882 views

ECMA script for checking active workflows for an list item

Hi i am having more than 1 workflow associated with the list if there is any workflow that is active for an item then i need to prevent starting another workflow for the same item. I am using the ...
anantharengan's user avatar
2 votes
0 answers
503 views

SharePoint InputFormTextBox returns javascript error while changing its position

I have created one aspx page for implementing the edit comments of the form. For this I am using the SharePoint InputFormTextBox control. I have a total of 4 Divs each containing one InputFormTextBox, ...
MAC's user avatar
  • 395
2 votes
0 answers
37 views

Instrumenting search term in SharePoint2010

I know SharePoint2013 can capture this data better but in 2010, i am trying to capture exactly what terms people are searching for. I have analytics logic that i can call as javascript. My search ...
user21479's user avatar
  • 121
2 votes
0 answers
2k views

How to get the return value of an on demand executed function?

I have a script file MyScript.js in the folder TEMPLATES\LAYOUTS\MyProject\Scripts which looks like this: var MyCompany = window.MyComapny || {}; MyComany.MyProject = MyComany.MyProject || {}; ...
Yavuz's user avatar
  • 333
2 votes
0 answers
1k views

Install an app from the appCatalog using javascript CSOM

I'm trying to install an app in a site from the AppCatalog using the javascript CSOM I get the apps from the App Catalog using req.apps = SP.AppCatalog.getAppInstances(clientContext, oWebsite); I ...
Benja's user avatar
  • 21
2 votes
0 answers
1k views

ListData.svc: How to upload attachment?

How does one upload an attachment to a list item using JavaScript/HTL5 file upload API and the ListData.svc API? I know I can do this using managed CSOM but I want to understand the SP 2010 REST API ...
Robert Kaucher's user avatar
2 votes
0 answers
1k views

How to add the standard sharepoint list item context menu?

we have written a webpart that outputs titles of list items. We now want to add to each of those items the standard flyout menu (see the picture) below, but don't know how so far. Can you help us out ...
prc322's user avatar
  • 121
2 votes
0 answers
2k views

Filtering SharePoint list items that have multiple values using jQuery

I have a SharePoint list that contains multiple columns of information. There’s a Category column that’s a look up to another list called ‘Category’. This is to produce unique ID’s for each of those ...
Tron's user avatar
  • 209
2 votes
0 answers
122 views

changing language on application page

I am using following code to change the language of HTML form on application page: <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> <...
SPBeginer's user avatar
  • 2,547
2 votes
0 answers
896 views

Programatically creating Discussion List Posts - and replying to them from Outlook

We are Programatically creating a Discussion List Post/Topic (using JavaScript) based on an entry in a custom list. The idea is to synchronize this Discussion List with Outlook. That does happen ...
Varun Rangabhashyam's user avatar
2 votes
0 answers
397 views

Validate list item with javascript API

I want to develop a custom datasheet view to edit a list. I add item through the javascript API. The problem is that the service doesn't control fields value. For example : - I add an item with a ...
bobosh's user avatar
  • 143
2 votes
1 answer
36 views

Transferring a scriptlet from List to Document Library

I have a list that I created which is now being changed into a document library. I created the library. I have scripts on the list to help me with some functions: A field only shows when "Other" is ...
Kimberly Abaid's user avatar
2 votes
1 answer
813 views

Open SharePoint Modern library in modal dialog not adhering to ms-dialogHidden or IsDlg=1

Question regarding Modern Libraries, I wish to open document libraries in a Modal Dialog on a page but have only the library shown, not the Office 365 Suiter bar and left nav. I used the standard SP....
GroFinJarrydP's user avatar
2 votes
1 answer
415 views

Enable ratings for custom list via JavaScript in a SharePoint Hosted Add-In (App)

let me just start by saying that I've searched for about 8 hours and I've read every accepted answer for CSOM, PowerShell, list settings etc and tried to convert the codes myself into a working ...
Fredrik Johan Lund's user avatar
2 votes
1 answer
140 views

Hide empty columns in PerformancePoint Scorecard dynamically

I have a scorecard with several empty columns which I want to hide dynamically. In the illustration above, I want to hide three empty columns, viz. MidYear Income, MidYear % and MidYear Status. ...
Merin Nakarmi's user avatar
2 votes
1 answer
1k views

Pass NewItem ID to Callback function from NewItem form

I have a rigged a link to call the NewItem.aspx form in a dialog. When the User clicks 'Save', I would like to return the new item ID in the callback function. How is this achievable? <a href='...
Michael Colbs's user avatar
2 votes
1 answer
469 views

SP2010 JSOM: error when trying to get all users of specific group using javascript

having trouble getting users return from specified group using javascript per this on MSDN var siteUrl = '/sites/MySiteCollection '; function retrieveAllUsersInGroup() { var clientContext = new ...
Justin's user avatar
  • 1,361
2 votes
1 answer
2k views

JSOM How to get User Id

When trying to resolve a user with the ensureUser() call, the object is always returned as undefined even though the user exists as a Domain and SharePoint user. //Calling code. var currentCtx = SP....
KidBatman's user avatar
  • 381
1 vote
1 answer
9 views

Filtering SP List using created

I want to filter the SP list using created date so that list items created in last 8 days get displayed. I am using: private getCarouselListContent = () => { try { let requestUrl = `${...
KIRTI JAISWAL's user avatar
1 vote
3 answers
44 views

Using SharePoint 2016. Trying to write JavaScript to change row color based on today's date and "SuspenseDate" in list. Help?

I would deeply appreciate any help. I have been staring at this code for days. I am trying to add a Script Editor web part above a list, and make the rows in the list change color according to how ...
OKSharePoint1234567's user avatar
1 vote
2 answers
32 views

Anniversaries webpart using Azure AD

I've a custom webpart Anniversaries, which get data from list. This is my service to get data from list: public get(listName: string, startDate: Date, AnniversariesNumberOfItemsToDisplay: number): ...
Propool's user avatar
  • 37
1 vote
1 answer
311 views

How to create several files with addUsingPath in a batch?

I'm trying to use pnp/js to create a batched web and add new files to a folder with addUsingPath with this code: const sp: SPFI = spfi().using(SPBrowser({ baseUrl: options.baseUrl })) const [...
Angelo Selvini's user avatar
1 vote
1 answer
31 views

Help passing list item ID

I'm currently using a script to display calendar events with some added styling. It's originally from: Display Calendar Events From SharePoint Calendar Lists Using Rest API I'm running into an issue ...
Robert's user avatar
  • 11
1 vote
1 answer
108 views

Upload Attachments on SP CUSTOM list

I'm using HTML to create a custom list with bootstrap and then JSOM to manipulate and display the list on a SP custom list. I am looking to add attachments and I can't figure it out. Can anyone help? ...
Robbie's user avatar
  • 11
1 vote
1 answer
226 views

SPClientPeoplePicker.SPClientPeoplePickerDict ProcessedUserList DisplayName values

I've used this code (found on this site) to access a people picker field in SP2016: var peoplePickerID = "field title"; var clientPeoplePicker = SPClientPeoplePicker....
whahoo's user avatar
  • 21
1 vote
0 answers
28 views

Populating field value from another list with JavaScript doesn't work

I have a list called 'quotes' and list called 'autoquotenumber'. 'autoquotenumber' only has one item id=1 which is used to keep track of the quote numbers. I would like to retrieve a column from '...
Tyler's user avatar
  • 13
1 vote
1 answer
103 views

Hide Multiple Choice field with jQuery

I have a field in an SP 2016 form that looks like this: I'm trying to hide the row that the multi choice field is in. I've tried multiple things. #1 doesn't work at all. #2 hides the check boxes but ...
Patti N's user avatar
  • 23

1 2 3
4
5
30