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)

1
vote
1answer
209 views

Retrieving current user's profile picture throws “Access Denied” error

I'm trying to get the current user's profile picture and I'm using CSOM. But I receive an Access Denied error, when I actually gave Read permission to user profile service. ...
1
vote
3answers
281 views

Need to Check Username

In the "Created By"List Column I need to search if Current login user is present or not using Java Script. How can I achieve that.
0
votes
0answers
28 views

Modify People Picker Located in IFRAME on WebPage

I am new to SharePoint and need some assistance. I have a webpage written in normal HTML and JavaScript with an IFRAME that contains a SharePoint page. When the webpage loads, it contains the user's ...
0
votes
0answers
7 views

NamedItems show in a div element

Usually i am working with NamedItems in a WebPart to show them on SharePoint. But I would like to show NamedItems (from a Excel) in a div element with JavaScript or any other language on Sharepoint - ...
0
votes
1answer
57 views

SP13: Custom List Add Item Redirect

This is possible with a SharePoint Survey, but not sure how it's done using a Custom List. I have a custom list and when someone adds an item after they click 'save' it opens to the list library ...
1
vote
2answers
424 views

Programmatically create fields in a SPList using Client Side OM

Has anyone tried with creating some 20+ Single line of text SPField using Client Side OM, like within a Content Editor Web Part. Because creating a SPList with these many number of columns using ...
0
votes
0answers
29 views

Javascript search code really slow in external page only when loaded in SharePoint

A while ago my supervisor asked me to build a tool to display some information from our ERP system. The ERP system is not that great, and often it is easier to just hack together a CGI script to ...
0
votes
1answer
281 views

Validate Choice Field with multiselection Checkboxes on PreSaveAction function Call

My SharePoint 2010 list has a choice column that with checkboxes and allows multiple selections. For all these checkbox field choices there is a corresponding textbox fields are created. This textbox ...
2
votes
0answers
45 views

CSR - One function for every field in a View?

We all know how to define one template function for one field. SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ Templates: { Fields: { "[fieldname]": { ...
1
vote
1answer
87 views

sharepoint profile picture

Is there any possibility to change profile picture or uploading a new profile picture in SharePoint Online by using SharePoint hosted app, via JavaScript or jQuery? How do you solve it?
0
votes
0answers
45 views

Check whether user is active or inactive in Active Directory using REST API or JSOM?

How can I check whether user is active or inactive in Active Directory using REST API or JSOM ?
2
votes
0answers
39 views

How do I restore specific list item version using JavaScript?

How do I restore specific list item version using JavaScript? Is there any way to restore specific version of list item using JSOM or REST API in Share Point?
0
votes
1answer
54 views

Connect to SharePoint data with JS

I have following link that have XML data from SharePoint http://appsrv/pfa/_api/ProjectData/Projects?$select=ProjectName,ProjectStartDate,ProjectPercentCompleted and I have a username & ...
3
votes
1answer
98 views

.find().filternode().each() v/s .find().each()

I came across a lot of articles and discussions by Marc D Anderson and Steve Workman regarding performance gains using .filternode(). I also read an article by Steve Workman I also tried to ...
0
votes
0answers
16 views

SharePoint 2010 Search Results Per Page not exact

I have a page set up with a People Search Core Results webpart on it. When I set the 'Results Per Page' display property to 50 it doesn't show 50 results. It shows 44 or 46 or 48 or some other number. ...
0
votes
1answer
52 views

Quick Launch Menu Selector

The objective is to increase the size of the menu within the fly-out. I applied the script below. The only thing highlight that highlights the menu item when you hoover over does not appear any ...
0
votes
2answers
287 views

Display Description of choice column type on top in SharePoint 2013

I have created a list with type Choice and set Description for the same. I have set Radio Buttons as Display Choices Using. When I click on Add New item the description is shown at the bottom. Is ...
1
vote
1answer
49 views

jQuery Blur function in Content Editor web part in SharePoint 2010 List form

Want to know how to use a jQuery blur function for my SPNumberField, single line of text etc fields.I do not have the ID of the field, also how to get the ID for using the same in jQuery function? ...
0
votes
1answer
78 views

Validation of multiple textbox, number fields using JavaScript

I am doing the JavaScript validation of SP 2010 list mynewcustomform.aspx page using the code written in content editor web part. Fields are: textbox1, textbox2, textbox3. var valoftxt1 = ...
5
votes
2answers
475 views

Null Reference Type Error using Javascript in Sharepoint 2013

Having an issue with javascript in sharepoint 2013. We have set up javascript and it is working by changing the colours of the rows in a task list. The issue is when the user goes into quick edit, and ...
2
votes
1answer
599 views

Programmatically create workflow with JavaScript, JSOM and SP.WorkflowServices.WorkflowServicesManager

I want to create and add a workflow programmatically to a list on SharePoint Online using JSOM (with sp.workflowservices.js). First I created a test-workflow like this using SharePoint Designer 2013: ...
4
votes
3answers
455 views

How can I get two List Items using one Caml Query?

I need to get data from two customs lists that I created. However only the first list item is queried allowing me to use the data in the Home Page list item only, but I need both. var listItems; var ...
0
votes
1answer
279 views

How to set a value in a Choice Field based on the text box change SP 2010 in list newform.aspx

I am having few fields like single line of text, choice field, rich text on my customnewform.aspx of my SP 2010 SPList. Now if I enter a value say USA on the text box, I need to set the ...
0
votes
2answers
39 views

Using javascript and Jquery widgets in Visual Web Part. Is it posible?

I am trying to build a Visual Web Part in Visual Studio for Sharepoint Foundation and I am wondering if I can use Javascript for some functions and jquery widgets to create a listbox? I have tried but ...
1
vote
3answers
284 views

How to insert data into lookup column using javascript

I have created a custom drop-down list and inserting drop-down data into lookup column(in a list). How to insert drop down data into a look up column? I am trying below code but it is not working. ...
0
votes
1answer
397 views

Make promoted links responsive

I have managed to add some JavaScript that I found here and almost get my promoted links to be responsive. The only issue is that when my screen gets below a resolution of approximately 900px the ...
0
votes
1answer
243 views

Using the variable of .aspx code in .js code

I have one variable in .aspx code and i want to use it in my .js code. How to make this work? In .aspx code.. var url = document.referrer; var res = url.split("?"); var str = res[1]; So I want ...
0
votes
1answer
164 views

how to override the redirect function of cancel button in Display form?

I have a custom list and I am showing some items on the home page. When the user clicks on a link it is sent to the display page. But, when you are on the display page, the cancel button returns the ...
0
votes
0answers
59 views

Passing Query string from SharePoint site to app part

I am trying to pass Query string from sharepoint page to an app part. I have followed ...
0
votes
1answer
783 views

JavaScript runtime error: Unable to get property 'split' of undefined or null reference

While debugging I got this error in my below part of code.. queryStirngValue = document.referrer.split("myQuryString")[1].split("%")[1].split("253D")[1]; alert(queryStirngValue);
8
votes
1answer
609 views

What does this code getQueryStringParameter do?

I would like to know what this code does? I am using it almost all the time but I don't know what it does. function getQueryStringParameter(paramToRetrieve) { var params = ...
0
votes
1answer
43 views

Retrieve users into particular group using Javascript

I have created 2 groups(epm and mobile). I inserted some users into particular group. How can I retrieve users based on current group? For example in a dropdown if I choose emp group I want to show ...
0
votes
2answers
140 views

Using CEWP to run JavaScript

I have a SharePoint 2013 Online site. On a form page, I am trying to use the CEWP to run JavaScript to allow me to pre-fill in a form field and then disable it. I have found numerous sites which ...
0
votes
3answers
780 views

Get the value from Textbox and dropdownlist in NewForm.aspx using jQuery and JavaScript

I am trying to retrieve the value of Textbox and dropdownlist in NewForm.aspx using jQuery and JavaScript when PreSaveaction is called. Below is my code: But both cases, I am not able to get values ...
0
votes
2answers
932 views

How to check if a list item exists or not in SharePoint 2013 using javascript

I have created one custom form and insert data into one list.I want to check before data insert into the list if the data exists in list or not .
2
votes
1answer
381 views

Sum Calculated Column (SP 2013)

There is a very nice solution below from ViewMaster (http://www.viewmaster365.com/#/Create/Sum) that involves some scripting within the formula of a calculated column itself. However, the Sum will be ...
1
vote
1answer
100 views

Instantiate SP.FieldUrlValue fails with “Uncaught TypeError”

I am trying to change the values of SP.FieldUrlValue in a list on SharePoint 2013. The goal is to add thumbnail of some images to the image field of my list based on the name of the title field. I ...
1
vote
0answers
131 views

Read Video File using File Reader in JavaScript

I am using below code to upload video file in SharePoint Online video library. function RequestExecutorLoad(){ var context; var factory; var appContextSite; context = new ...
1
vote
1answer
45 views

Why does ElementById return null for a Sharepoint app?

I'm trying to get the an element's ID tag using JavaScript in order to manipulate the styles. The element is created by an app from the Office Store but I would like to change the look. <div ...
0
votes
1answer
32 views

How to find and replace specific words on a 2013 Community Site?

When you create a new Community site, you'll see the Discussion list. Just above that is a button where it says "new discussion". Below that is a view called "My discussions". See screenshot below. ...
0
votes
1answer
138 views

where to put C# code and where to put Javascript code in .aspx form in SharePoint Designer

I'm newbie with sharepoint, struggling but finding my way. I've created a list and created a new form called NewFormRequest.aspx in SharePoint designer. I'm calling this form in the browser ...
1
vote
1answer
177 views

Bind Multiple SharePoint Group To Client Side People Picker

I want to bind multiple SharePoint Group to Client Side People Picker Using JavaScript. Requirement as below. I have two SharePoint group Group 1 and Group 2. I am able to bind group 1 by sending ...
1
vote
1answer
508 views

How to get all the sharepoint 2013 site users using csom javascript

I know how to get all users in share point site by using c# code ,but i want to get all site users using csom javscript. Any ideas?
0
votes
0answers
28 views

javaScript appendChild property

var selectOption2 = document.createElement("option"); // alert(selectOption2); selectOption2.value = results[i].Name; alert(selectOption2.value); ...
0
votes
1answer
33 views

JavaScript createElement() Method [closed]

What changes should i make to create buttons in the next line. <!DOCTYPE html> <html> <body> <p>Click the button to make a BUTTON element with text.</p> <button ...
0
votes
0answers
135 views

sp.listOperation.Selection.getSelectedList() returning null

I am trying to enforce Drag and Drop documents to apply metadata, I've looked at this question from a year ago and the answer by @Mx. really helped, it's working perfectly on my .AllItems page. But ...
1
vote
2answers
314 views

SharePoint 2010 listdata.svc dates incorrect time zone

I have written an Angular site using the SharePoint 2010 REST Api. To query the list I use listdata.svc, for example: ...
1
vote
2answers
198 views

how to insert users into particular group using csom javascript

I have created one group using csom javascript upto here working fine . I want to how to add users to particular group using csom javascript.Any ideas?
1
vote
1answer
134 views

How to change “Who can view the membership of the group” Group Members to Everyone through csom javascript

I was wondering if it's possible to alter a setting of a group such as Who can view the membership of the group? Setting from Group Members to Everyone through CSOM or through SP's web services. ...
0
votes
2answers
110 views

Getting list item in SharePoint hosted app

I have used the below javascript code.. .js File 'use strict'; var hostweburl; var appweburl; $(document).ready(function () { hostweburl = decodeURIComponent( ...