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.

learn more… | top users | synonyms (2)

0
votes
1answer
65 views

Uploading File with rest api and HTML5 api

I am using SharePoint 2013 on premise. I am trying to upload file to the custom list from custom webpart purely jQuery and javascript. In my form I have hyperlink, when I click on it, it will open ...
1
vote
4answers
114 views

change SharePoint list field color using jquery code base on value?

I am working with SharePoint list and I need to change the Number field color if it is greater than 60. I tried to change the code below but it did't work. I also checked all answers but none of them ...
0
votes
1answer
42 views

Fetch the document name from Document Library using Document ID

I have a Document Library with multiple documents. One can select multiple documents even all the documents at a time. I need to fetch the documents name which are selected in Javascript using JQuery ...
0
votes
1answer
31 views

Trying to Start SharePoint workflow from code

I have what may be a familiar piece of code for starting a SharePoint 2013 workflow, except mine fails with an error of "Error: Value cannot be null. Parameter name: subscription undefined." The log I ...
3
votes
1answer
41 views

How to know which people picker is which

I'm trying to replace all of the "bad" old-style people pickers on our custom new/edit forms with the new good client-people pickers. With this thread I came up with the idea to use jquery to find ...
1
vote
1answer
47 views

CSR: ScriptLink/Custom Action CDN Libraries load after JSLinked files are loaded

I am almost to 2.0 with the generic iCSR support library. Having some issues with deployment: Adding the library as SiteCollection ScriptLink/Custom action loads it before msajaxbundle where ...
0
votes
1answer
35 views

changing field values by js // ClientFormPostBackValue // webparts

i have kinda strange issue here. i have an item form. on that form i placed a webpart list view. this webpart list view is binded to my item by ID. this ID i placed in a simple input text field. ...
0
votes
1answer
36 views

New/Edit form how to tell if people picker is multiple or single with code

I'm doing some manipulation of my new and edit forms using javascript and jQuery. I'm able to find all the people pickers on the page with the following selector var $pickers = $('div[title="People ...
3
votes
1answer
73 views

How to get current master page and replace it on the Site using javascript

I am using SharePoint 2013 Online and I'm looking for some JavaScript and html to get current master page for the site and change the same with other master page. If anyone could help or just point ...
3
votes
1answer
59 views

Is it possible to write any c# or server side code in SharePoint hosted app?

I want to render some code dynamically so is it possible to write any c# code in my SharePoint hosted app? And if not, then what are some alternative approach to achieve such goal?
1
vote
0answers
50 views

CSR: RegisterModuleInit without hardcoded JS filename?

Always looking to make CSR development easier... This the typical CSR programming pattern: We hardcode the filename inside the CSR file SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", ...
3
votes
0answers
69 views

How to stop a SharePoint workflow using JSOM

Let me preface by saying that I'm a relative newbie to this SharePoint stuff and am still fumbling my way around a bit learning from code examples where necessary. That being said, I have no issue ...
1
vote
0answers
15 views

Adding documents into a Document Set folder in SPO by busing Javascript

I am working on a project where I have to build the logic to upload documents into document set folders and I am stuck building the end point. Can we work with document sets in the same way we do it ...
0
votes
1answer
74 views

SharePoint Online (Office 365) - AutoResolve people picker with current user and detect change in people picker value

I am trying to implement a solution in SharePoint Online by customizing the NewForm.aspx page of a out of the box Calendar List using javascript with the following requirements: When page loads, a ...
0
votes
0answers
32 views

JavaScript not firing after Page Refresh or Paging

I'm using some JavaScript to manipulate a list view, such that the clicking of a button (provisioned through a calculated column), will redirect a user to another page. Based on the reference in ...
0
votes
1answer
50 views

Need suggestions to attach JavaScript function to SharePoint search button click

I need to attached custom JavaScript function to SharePoint 2013 search button click. When user enter some text in search box and click search button or click "Enter" key, my custom JavaScript should ...
1
vote
0answers
36 views

Managed Metadata Global Navigation

I’m using managed metadata to create global navigation on a SharePoint Master Page. I understand that a managed metadata term set can only be applied to a single site collection. To bypass this I’m ...
-1
votes
2answers
31 views

how do i create a custom UI for a list column

What is the best way to create a custom feature to customize the UI of a list by filling in the column and/or field green when the value for row item = yes/no?
1
vote
1answer
45 views

How to change the font of column name

Is there a way for me to change the font size/ family for a particular column name for Default New Form web part. (jquery/ SPD) Like the following image (diff from default style) Thanks!
1
vote
1answer
69 views

Check if View (GUID) is displayed on the current ASPX page

Result of eXtreme Programming.. (and too early to drink wodka) I am sure there is a one-liner to check if a View is displayed on screen function webPartOnScreen(guid) { guid = guid.replace('{', ...
3
votes
1answer
42 views

Trying to Skip an empty field. Returns null instead

I am trying to pull data from a list, but skip any that are empty. Below is the portion of my JS link that Is having this error: var description = document.createElement("a"); description.innerHTML = ...
-1
votes
1answer
36 views

Getting list items in SharePoint Hosted App for Office 365

I want the code snippet for Getting the list items and Show it in the App page. I'm creating SharePoint hosted app for Office 365. How do i get the list item values? Thanks in Advance
1
vote
1answer
39 views

Reset ratingcount for list item using javascript

I wish to reset the ratings for an item after a list item is edited. I can get the Average rating to be reset back to 0, but not the ratingCount. How can I do this? The code I am using is var ...
0
votes
1answer
23 views

Birthday Icon on the Curren Date

I have a Calendar which show the birthday reminder for our users , everything is going good but now I want that my calendar will show a small pic on a current date if there is anyone's birthday in ...
1
vote
1answer
43 views

Custom pagination

I have a SP list called "Company" containing 6000 items. Also I don't have access to central admin nor I have a site collection administrator permission(also no designer access). I want to create a ...
1
vote
0answers
41 views

Active ADFS authentication, token is always invalid

I am attempting JS-based ADFS authentication to consume SharePoint resources. I am using active authentication (browserless) to get a SAML token from the ADFS server. A portion of the XML I get back ...
0
votes
0answers
27 views

Javascript with MDS in Visual Webpart

I need to include a Javascript file in my visual webpart, but using the Minimal Download Strategy. The problem is when i would like to include a SharePoint:ScriptLink tag in my ascx file, i have some ...
0
votes
0answers
19 views

Webpart that uses CSS fixed positioning

I have a two column webpart page. On the left side is a link list webpart, which I would like to stay in sight as the right side scrolls. Is this possible? I did see an example which did it with the ...
5
votes
1answer
64 views

is current ASPX page a List or Library page?

Is there a better way of testing if the current ASPX page is a List (or Library) page? I now have: if( !( document.location.pathname.indexOf('/Forms/')<0 && ...
1
vote
0answers
35 views

Create a custom permsetup.aspx and add extra text fields for new groups

I have the following requirement: When a user creates a new site via Site Settings\Site Content\New Subsite, and he selects "use unique permissions", the user is redirected to the page: ...
0
votes
1answer
62 views

Get field value in modal list item display dialog on Sharepoint Online

I have a basic custom list with items that open in a modal display form. I need to get the value of one of the fields, store it in a javascript variable, and further process it. How do I get the field ...
7
votes
0answers
148 views

When JavaScript runs

Working on an overview of all possibilities of adding JavaScript. Can someone confirm Custom Actions run **after JSLinks** By execution order: Page Scripts using <script> tags or scriptlink ...
0
votes
2answers
23 views

SharePoint Forms Fields depend on User

I hope you all are doing good. I have an query regarding SharePoint forms I hope if anyone can help me out. I want to create a SharePoint form where a member from any department can ask for a leave, ...
0
votes
1answer
40 views

Display Profile Image, Can't Select Picture Url

I am attempting to retrieve some profile properties for the current user, and am having a hard time with the profile picture Url specifically. Version is Sharepoint Foundation 2013. When I open the ...
0
votes
2answers
21 views

Color coded calendar 2007 versus 2013

I have a calendar color coded in SP 2007. Its working good. I used the same code in SP 2013, but it doesn't work there. Any Suggestions? <script language="javascript" ...
0
votes
2answers
75 views

Get User ID from ClientPeoplePickerWebServiceInterface Web Service through Javascript

I am using this webservice /_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.clientPeoplePickerSearchUser to build an autocomplete solution for my SP app. The problem is, the ...
1
vote
0answers
27 views

JavaScript: add AD security groups to list item permissions

I use the code below to group permissions on list items. This works fine for SharePoint groups. How'd I do this for AD security groups? (SP2013) restrictToGroup = function( a ) { var ctx = new ...
0
votes
1answer
39 views

Logical operators are not working in JS file

Everything is fine I am able to fetching the data from SharePoint 2013 List using CAML query in my js file. But when i try to get the data via dropdown conditions my code is executing in the else ...
1
vote
1answer
33 views

Showing Item context menu in custom Javascript page

I have created a Javascript page, that uses some REST calls to query a list (actually several lists) and shows some highly customized output. All this is working quite good. My final requirement is, ...
1
vote
2answers
72 views

Delete all items in Recycle Bin using javascript

Is there a way to batch delete all items in the recycle bin on the client side in SharePoint Online? I've tried using javascript:emptyItems() in the browser but this appears to time out after ...
1
vote
0answers
25 views

request query using jsom for project server (ps.js) another user

request query using jsom for project server (ps.js) another user i need request a query using another user, no my current user this is possible ? I'm using JSOM with ps.js for project server 2013 ...
3
votes
1answer
77 views

Getting item id from newly created item

I am using SharePoint 2013 Enterprise version. I am using below rest api code to add the record I kept below code in common js file function CreateListItemWithDetails(listName, webUrl, newItem, ...
0
votes
0answers
31 views

Calculation on different types of leaves in JavaScript?

I have a list (List A) with different type of leaves like casual leave, sick leave, earned leave.. So in this list management will give some leaves to an employee per year like Casual leave=20 days ...
4
votes
1answer
75 views

SharePoint CSR Conditional Formatting is working but row highlighting is not

I was testing the flexibility of CSR and came across a problem which i am not able to resolve . I have created a list which contains product details like Total Sales and Sales Target . I am trying to ...
1
vote
2answers
45 views

How do I reliably inject a meta tag onto a SharePoint page without editing the master page?

I don't want to edit any master pages for obvious reasons given that I am on SharePoint Online. But I am trying to achieve responsiveness on my sites. For this, I would really like to use the ...
0
votes
1answer
41 views

SP13: Adding Shading to Custom List

I have a custom list created in SharePoint 2013. I have few lines of css in a script editor. When I add Shading style under modify view the css added stops working. To add the shading without using ...
-1
votes
1answer
51 views

javascript countdown in html code of homepage [closed]

I added a javascript in a contenteditor on my homepage, the javascript is a countdown to a specific date in days. When I put it in my HTML it works well, but after a day the counter shows me first ...
1
vote
0answers
54 views

toLocaleDateString() formatting

I am using the above method to format my date, but for some reason it is formatting the date using the English US format: MM/dd/YYYY even though the locale for my site is English United Kingdom. I ...
1
vote
1answer
57 views

Get start and end date of current week which starts in one month and ends in another month

I have to get start date and and end date of current week. I used this code but end date is getting previous month name if week start in one month and ends in another month. Date.prototype.getWeek = ...
0
votes
2answers
49 views

SP13: Changing Edit Icon

I am sure this is possible, however, not sure if this is an out of the box fix. Goal: To remove the edit icon ( )and add the word "edit" Is there an out of box solution?