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)

5
votes
2answers
434 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 ...
1
vote
1answer
477 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
417 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
244 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
38 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
251 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
341 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
241 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
145 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
51 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
668 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
550 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
125 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
689 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
798 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
319 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
96 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
106 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
42 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
125 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
155 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
444 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
30 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
126 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
256 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
166 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
103 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
103 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( ...
0
votes
1answer
64 views

Site settings JavaScipt

I have included some javascript to a master page of a site collection. The script makes a clickable button directs to two sites which when an internal user click on it user directs to a internal ...
2
votes
3answers
266 views

Help with Dual Javascript countdown clock

I am having a little trouble figuring out how to make this work properly, I am trying to put a small countdown clock in the left column and one in the right column, which will show a countdown to two ...
0
votes
1answer
38 views

Custom JavaScipt within Site Settings

I have included some JavaScript in a master page of a site collection that shows a button. When an internal user clicks the button it directs to an internal accessible site and when an external user ...
0
votes
1answer
270 views

Closing the Window from Visual Web Part Page in Chrome is not working

<script lang="Javascript"> function quitBox(cmd) { if (cmd == 'quit') { open(location, '_self').close(); } return false; } </script> <input ...
1
vote
2answers
60 views

Insert current logged on user's email address into script embeded on Sharepoint page

I have to login to another system from SharePoint. This is done by embeding a piece of javascript which redirects the user to the site, but must grab the current users email address to insert into the ...
3
votes
3answers
1k views

Get Current Login User Profile Properties SharePoint

I need to get current login User profile properties provide information about SharePoint users, such as display name, email, PictureUrl and other business and personal information including custom ...
0
votes
1answer
135 views

Javascript API calls on AccessDenied page not working

I made a copy of AccessDenied.aspx and added some modifications. See below. All I've done is add some html and javascript to get display information about the currently logged in use. This code works ...
0
votes
0answers
101 views

Create new OneNote notebook from template with filename using JavaScript

I'm currently in a use case that I need to create a new OneNote notebook on SharePoint from a template notebook. I'm coding in Java (web) and for the moment I have this code : ...
1
vote
2answers
189 views

Anyone used the countdown timer javascript in lists?

Has anyone managed to incorporate Keith Wood's countdown javascript into a list view? http://keith-wood.name/countdown.html I have found the following link, which looks extremely promising, but ...
0
votes
0answers
32 views

Get broken inheritance items via spServices (SharePoint 2010)

Is it possible to get all items of a list, where the inheritance is broken? There´s an additional property for items via CSOM (HasUniqueRoleAssignments), but my task is to write code which can fetch ...
0
votes
1answer
717 views

Set value of peoplepicker using javascript

I have a newrequest.aspx page in a Sharepoint 2013 App with a form on it to get details from my users to submit a leave request,this is then submitted to a Sharepoint list to hold all of the requests ...
2
votes
0answers
34 views

What are the different ways to consume SharePoint REST using Javascript

I know of two ways, using ajax and using SP.RequestExecutor.js. Are there any other ways. Code snippet and information around performance will be appreciated.
1
vote
1answer
122 views

Page with Javascript refreshing after script

I'm using Sharepoint Online through our company's Office 365 subscription. I wrote a page that generates a company standard email signature: <html> <head> <style type="text/css"> ...
0
votes
1answer
44 views

Cascading dropdown with long texts(string)

I have a scenario where on selection of service, I am filling services description drop-down, which is working fine. But, since the description is having lengthy texts it looks really ugly. Is there ...
1
vote
1answer
335 views

news ticker tape on sharepoint list SP 2013

At the top of my sharepoint list view, I am wanting to add in a vertical news ticker feed, similar to this: http://risq.github.io/jquery-advanced-news-ticker/ I have tried four approaches so far ...
-1
votes
2answers
58 views

JS not working when user is a reader

I have a JS that displays something in a page, when I login as a Reader, it doesnt display anything (when I debug the JS using IE Dev tools, it runs but ends at some point) But when I login as a ...
0
votes
1answer
24 views

Javascript to hide upload and actions but keep new [closed]

Can anyone please provide some JavaScript code so I can display New but hide Upload and Actions in the menu of a document library.
0
votes
1answer
145 views

Prevent duplicates in a SP list. I am using Javascript

I am trying to prevent duplicates in a SP list but my code does not work. e.g if an item "James" exists in my list it should not be possible to add same item instead an alert message should show up ...
1
vote
0answers
93 views

Custom Workflow History page

I'm building a custom workflow history page which shows the history of workflow steps that we're executed (much the same like the original wrkstat.aspx page). The reason why I'm building it, is ...