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
0answers
28 views

Programmatically Edit and Programmatically Save Edited Wiki Page in Sharepoint 2013

I inserted javascript code in a Sharepoint 2013 wikipage, through Embed Code. The basic javascript code appends rows to a table, the code is var myTable= document.getElementById('myTable'); ...
1
vote
1answer
54 views

Pre Filling SharePoint Field using Javascript

I am using REST API to create list item in another list. Based on the successful creation of the list item I am just updating the current SharePoint field value.This whole process is executing through ...
0
votes
0answers
12 views

How to reference and dynamically display documents based off of input on a form

I'm using Sharepoint 2013. I'd like users to be able to select a series of drop down boxes of categories and have a list of documents automatically filter based off those choices. I'd also like to ...
2
votes
4answers
128 views

Caml Query to return items created by logged in user

Using Javascript CSOM and want to return items created by logged in user, but the code below returns all items. Could someone advise? var camlQuery = new SP.CamlQuery(); var specifier = ...
0
votes
0answers
20 views

SPService object is not loaded!

I am working on a script to fetch the user profile services and get the current logged in user. This was initially working on IE8 and not working in IE11. Now its not working in any browser, any ...
0
votes
0answers
14 views

Select2 in Sharepoint Application Page

Have a Sharepoint application Page where I use Select2 4.0 for Searchable Dropdown List. On my development PC everythink works fine but on any Client the CSS seems to be broken (Both use IE11). On ...
0
votes
4answers
71 views

number field to limited digits without comma in sharepoint list

On my SharePoint online site I have a custom list with a Number field.I want to apply validation on this field so that the Number should not be less than or greater than 5 digits and it should be ...
1
vote
2answers
57 views

Learning JavaScript used in SharePoint [closed]

Now I have started working in JavaScript that is used in SharePoint. I would need to perform basic operations like retrieve list items and display them as per the requirement. I am familiar with ...
0
votes
0answers
18 views

Enforce Drag and Drop documents to apply metadata (within folders)

I am aware of how to prompt for metadata when dragging and dropping files into a document library via this method. However this does not appear to support folders. If a document library contains ...
0
votes
4answers
85 views

Get SharePoint Data with javascript from html file

Hi guys I want to do the following: I have written a javascript code in a .html file. From that I want to access SharePoint Data with COM. So this is my code: <html> <head> <script ...
2
votes
1answer
26 views

Auto populate Share On Your Newsfeed Text

I have a requirement i want to auto-populate the text in the "Share on Your Newsfeed" textbox with some dynamic text. The background is we have a quiz and at the end of that we want user to share ...
3
votes
1answer
44 views

get_fieldValuesAsText usage example

I need to get items using JSOM and show them on a page in a display form. So currency field will be shown like $ 123,456.78 the date will be formatted accordingly to settings and Yes\No value will be ...
1
vote
2answers
45 views

Looping through ctx.executeQueryAsync

I'm trying to retrieve all the selected items and then get the value in the field name E_x002d_Mail_x0020_1. However there seem to be an issue regarding looping the ctx.executeQueryAsync, since it ...
0
votes
1answer
28 views

Get the default values for a Library

Is it possible to get the default values for a library using JavaScript? For example for the column A I've set the default Value 'Pencil'
0
votes
1answer
38 views

How can I make links in the left navigation open in a new tab?

I'm trying to make two links on the left navigation open up into a new tab as they are external sites. It should be as easy as adding target="_blank" to their HTML element but when I wrote some jQuery ...
0
votes
1answer
44 views

CRUD operation functions for SharePoint Online in JavaScript

I have lots CRUD operations in my project. I want to write generic function for same and include them in a single JS file. I will send relevant parameters to them and thereby achieve the required. ...
0
votes
1answer
24 views

How to retrieve target menu of specific list web part for CAMOpt?

I'm adding a custom action on the context menu of the item using javascript CAMOpt function: function Custom_AddListMenuItems(m, ctx) { CAMOpt(m,'View (new ...
2
votes
1answer
36 views

Set ASP DropDownList to SharePoint List Items

This one is probably really simple and I am missing something, I am creating an app dev model for SharePoint online and I currently have a ASP.NET DropDownList that I want to populate with items from ...
1
vote
1answer
38 views

Problem JSLink (color priorities) - Nothing changes

I have a problem using JSLink. The goal is to color in red, orange, green the priority field. For information, I followed step-by-step the tutorial given by Microsoft. In Site Features, I've ...
0
votes
1answer
43 views

List web part with option button in place of checkbox

I want to allow on a list web part a mutually exclusive selection for the items, so that I can force the user to select a single item and retrieve the item id using the SP.js JSOM. There is a problem ...
0
votes
1answer
27 views

Show Dialog when Input value changes

I am working on a Sharepoint application Page to Uplaod a File to a document libary. The Upload can take a bit of time so I want to display the waiting for it Dialog. I check if all requiered fields ...
0
votes
0answers
11 views

How to Track Silverligt video streaming length percentage in SharePoint 2013 using JavaScript

I want to track how much of a video's length is watched on Pause and Stop. How to track Silverlight video streaming length percentage (%) in SharePoint 2013 using JavaScript?
0
votes
3answers
37 views

Sharepoint CSS : dynamically add SharePoint:CssLink using javascript/jquery

How to add CSS Link dynamically to elements? $('head').append('<link type="text/css" rel="stylesheet" href="my css path">'); The below code doesnt work because we need to specify the ...
0
votes
1answer
36 views

How to display Sharepoint online office 365 site in aspx page

I have created an ASP.net web application where I am trying to display a SharePoint Office 365 online site through iframe. I am getting an error XFrame cannot be set to same origin How to ...
0
votes
1answer
27 views

REST API Search images

I'm doing a simple REST request to the SharePoint API and it seems that it doesn't retrieve images or videos, should I add something specific to the query text in order to have images and videos in my ...
0
votes
1answer
46 views

CSR Error: Cannot read property 'style' of null

Trying to color rows based off of the value of the "Status" column However I cannot get it working as it keeps giving the following errors: TypeError: Cannot read property 'style' of null ...
0
votes
0answers
18 views

How to Check if a Sharepoint user is in a security group no matter if this is in a AD group CSOM Javacript

I have a Sharepoint hosted app and I need to check if the current user is in a sharepoint security group no matter if this is in a AD inside the group, the following code check if the user is in the ...
1
vote
1answer
33 views

Refreshing connected child list view after parent update

On my web part page I have 2 list view: Parent and Child. Child is connected to Parent. Parent view is filtered Display=1. I click item "DDD" on parent list, take it to edit, change value Display=0 ...
0
votes
1answer
31 views

SP 2010 CSOM Javascript: Intermittent Failure

I have inherited some JS code that is playing up. It looks something like this: ExecuteOrDelayUntilScriptLoaded(MyFunc, "sp.js") function MyFunc() { var ctx = new ...
10
votes
2answers
241 views

SP.Utilities.Utility.SendEmail with additional headers [javascript]

Want to use the built in SendEmail with javascript and jquery. Found this code and got it working -- sends the email -- using the code below: var appweburl = "https://example.com/site"; var ...
0
votes
0answers
19 views

SharePoint 2010: How to add permission to a folder with JavaScript

I'm trying to create a folder in SharePoint 2010 Library with some modification of the permissions. I would like to remove one group from folder permission (inheritance from library permissions) and ...
2
votes
2answers
47 views

Open the document in the browser

I'm presenting some Search results to the user using REST API, is there something specific should I include in the link to the document so the document opens in the browser?
1
vote
0answers
35 views

Populate multiple text boxes based upon dropdown list selection in SharePoint 2013 on prem

I have 1 main list called OnCallEscalationContacts. This list has fields such as - TechnologyTeam [dropdown], FirstContact [people picker], FirstContactPhone [text field], SecondContact [people ...
0
votes
2answers
59 views

JavaScript not working in Firefox

I have put a snippet of JavaScript into a Script Editor Web Part. It's function is to display an alert box and redirect the page after an Infopath form submission. I got it from this website and ...
0
votes
0answers
16 views

Using JavaScript to create a custom form for a calendar list

I'm designing a device reservation tool on our laboratory's SharePoint site. I created a wiki-page showing all information of the respective device as well as a calendar for the device that shows ...
0
votes
0answers
21 views

how to get client context in a external js file

I have a SharePoint event list where start date and end date needs to be formatted to clients time zone. I am thinking of getting the regional settings and then converting the time. I have to write ...
0
votes
2answers
57 views

GetUserEffectivePermissions returning 0 (“EmptyMask”)

I'm trying to retrieve the current user's permissions for a list but I keep getting an emptyMask result, even when my current user account is a Site Collection Admin. function ...
1
vote
1answer
23 views

To ScriptLink or not to ScriptLink

I need a custom ribbon button that calls a function in a js file in one particular library. To get access to the JS file, I could: Add the JS file reference via a content editor web part on the ...
0
votes
0answers
55 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
3answers
37 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" ...
1
vote
2answers
48 views

How to get Current Logged Internet Explorer User Name and Domain Name

I need to get user details before hitting the SharePoint Server page. User hitting sharepoint page(https://spxy) then I redirect to https://spxy/_layouts/TestHandler.ashx via httpmodule. I need to ...
0
votes
1answer
47 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 ...
0
votes
1answer
55 views

how to by pass multiple claim authentication login page in sharepoint 2013?

My Requirement is I have sharepoint server 2013 .Now I just added two AD FS Server 3.0 and configured to sharepoint site http://spsxyz with Claim based authentication. Example of My Server Setup: ...
0
votes
1answer
25 views

Where to store publishing images

I've two site collections: an authoring like portal where authors creates the articles the intranet or publishing portal The articles will be created within a page in SharePoint in this page ...
0
votes
0answers
21 views

'SP.ClientContext.get_current' is null or not an object

I have created a javascript script ih the Home.aspx of sharepoint foundation 2010 (exactly in a web-content editor). I keep on getting always the same error:'SP.ClientContext.get_current' is null or ...
1
vote
0answers
36 views

Click promoted links tile to reveal another webpart

I have two sets of promoted link tiles. I've placed each set of tiles in their own webpart on a webpart page. What I would like to do is: 1. Hide the second set of tiles, and 2. Reveal the second ...
0
votes
1answer
27 views

How to make page that redirects dynamically based on URL

Sorry for bad title, I really don't know how to describe this problem. Any suggestion is welcome. I have to implement one custom button in ribbon bar in all documents to move files from one doc lib to ...
1
vote
1answer
26 views

Javascript code to write JQGrid data to excelsheet?

I am working on JQGrid, I found one solution but it is writing whole JQGrid on excelsheet. But I only want JQGrid data on excelsheet. My JQGrid data consists of sharepoint list data. So can anybody ...
1
vote
4answers
68 views

after clicking the cancel button close the popup window and redirect to parent window

I had a requirement in my code as follows After click the cancel button in the sp model popup window it should be closed and redirect to the parent window.
0
votes
1answer
33 views

The condition Greater Than (>) cannot work in my jquery code [closed]

I need to check the number of characters in class span, then change CSS according to the number. For example, if length of title is less than 29, the title color should be yellow. If length of title ...