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

UpdatePanel not working inside Parent GridView ItemTemplate

There is a SharePoint 2013 Visual Web Part in our project. It has 4 nested GridViews together. On click of one Image button 3 grids will get expand. Population is also coded on click of that image ...
1
vote
1answer
14 views

SP.RequestExecutor on SharePoint online

I deployed an App SharePoint hosted. I am using SP.RequestExecutor and it is working fine on SharePoint premise. but on SharePoint online it is not working. I added the library using this: ...
2
votes
2answers
16 views

SharePoint 2013 get user groups by CSOM

I wrote some code to get the current user groups by CSOM. function getCurrentUser() { this.clientContext = new SP.ClientContext.get_current(); this.oWeb = clientContext.get_web(); ...
0
votes
0answers
20 views

JSLink: Getting item URL or identifier

I'm using a modified version of the Accordion Menu code sample (here). Inside the accordianTemplate function, I need to get the URL or some kind of identifier of the currentItem object so that I can ...
1
vote
1answer
28 views

Creating dynamic accordion from a custom list using jQuery and jQuery UI in SharePoint not displaying as should

I am trying to dynamically build accordion from list of items returned using JavaScript, jQuery and jQuery UI. Below is my code: <div> Search List <input type="text" ...
0
votes
3answers
48 views

Get id of current inserted item by javascript

I'm currently trying to get the id of my currently iserted item. I'm making a timesheet which user is able to save and retrieve his own timesheet. The thing is that i put the ID of an item in the html ...
0
votes
1answer
28 views

Script in webpart freeze the whole site

I have a JavaScript in my script editor that on page load freezes the browser . I can't use SharePoint designer to remove it because the script is in a script editor. I have tried disabling JavaScript ...
0
votes
1answer
26 views

Recalculate Calculated Columns with Javascript

Has anyone some sample javascript code to recalculate a calculated column in SharePoint 2013 tasks? This should work on new and edit form and also with the AllItems view. Many thanks.
1
vote
4answers
114 views

Format Date (25 Jul) using Javascript Object Model

I am using sp2013 and building display templates. I would like to build a locig in javascript object model to get a date field back and display it on a page e.g. var itemDate = $getItemValue(ctx, ...
3
votes
1answer
41 views

How to set a List's Default Content Type (order) by using Javascript?

I've spent a lot of time Googling and MSDNing on this topic and then stopped at the set_uniqueContentTypeOrder method. This method will take an array of Content Type IDs and change the "New Item" ...
0
votes
0answers
11 views

Start Workflow with Initiation Form via Ribbon

I want to start a workflow for selected items using JavaScript and a custom button on the Ribbon. I was able to get this working with the help of SPServices. In essence I needed to get the item id, ...
0
votes
0answers
10 views

Discussion Board Best Reply Clost Thread

I am creating a discussion board app and want to know if I can amend the top button that has the text "Best Reply". I want users to be able to mark the discussion as complete. I am adding a choice ...
0
votes
1answer
48 views

Get ContentType name with select fields

I have a problem with getting the ContentType name for a item. when i use http://sp2013dev/sites/mms/_api/web/lists/GetByTitle('List')/items(1)/?$expand=ContentType I get as response all Fields ...
1
vote
1answer
25 views

Reindex search results (Content Search Web Part, 2013)

I will just leave this here, since it helped us a lot: We have a Content Search Web part with custom Display Templates with link to edit item. After user edit item, we want to refresh the search ...
0
votes
0answers
49 views

Use jQuery to make a “column” on the default view?

I am trying to append a value to the end of each row by selecting the number value in one column to do some sort of math with it and output the value on the other one. This code works for me on one ...
0
votes
0answers
22 views

How to change state (toggle on/off) of ToggleButton?

There is a ToggleButton: <Tab Id="Ribbon.Book" Title="Book editor" Description="" Sequence="2"> <Group Id="Ribbon.Book.TextFormatting" Description="" Title="Text ...
0
votes
2answers
52 views

How to make webEnumerator.moveNext wait until executeQueryAsync query executes

I want executeQueryAsync to complete before giving back control to webEnumerator.moveNext, anyway ? function onGetSubwebsSuccess(sender, args) { var webEnumerator = webCollection.getEnumerator(); ...
1
vote
2answers
83 views

How to get title and url using allproperties

How can I get title and url using allproperties? I can get custom proeprty but do not know how to get title and url. I am not able to know as why I get the alert twice in the following code, ...
1
vote
2answers
31 views

SharePoint - How to get field value using JSOM + JSLink without Async call

I'm fairly new to the JavaScript Object Model (JSOM) and I want to do a simple call to get a field value. Very easy in C#, but I can't seem to get a field value even though I have the ListItem: ...
0
votes
1answer
27 views

Retrieve list item information using path

Using: SharePoint 2010, JavaScript, jQuery 1.10.2, SPServices In SharePoint 2010 I have a custom (JavaScript-based) page where users may type in text and link to items in SharePoint lists. A recent ...
0
votes
0answers
13 views

calling a function from choosing a value from a drop down [closed]

I have two drop down's to choose units like inch,feet e.t.c and significant digits after decimal desired by the user for calculating the area and other properties of circle..... don't have any past ...
0
votes
2answers
29 views

How to insert record to sharepoint multi choice field via CSOM

I am trying to insert a Multichoice (checkbox) field to sharepoint via the SP namespace in javascript. Updatnig single choice is simple. For Multichoice I have tried: var itemCreateInfo = new ...
0
votes
1answer
29 views

Navigating to new page loses querystring

I have a on premise sharepointed 2013 application. On the home page, there are several links to different pages within the application itself...such as <a href="User.html">User</a> ...
0
votes
0answers
33 views

SharePoint 2010 Web Part that needs to call a dll and .js files

I am trying to create a SharePoint 2010 web part. The web part I am trying to create will contain, among other things, a custom asp.net server control as a dll. The dll refers to a number of files ...
0
votes
1answer
23 views

Javascript/jQuery - check language and replace word problem

I need to replace one word in my SharePoint site, depend in on that what language is used. I found this question: Get the current UI language with ECMAScript I tried to use that code and it works ...
0
votes
1answer
55 views

Get list items created by logged in user with REST api

How can I get all list items created or changed by the currently logged in user with this function? What's the correct query? // Getting list items based on ODATA Query function getListItems(url, ...
2
votes
1answer
142 views

How to add URL to list using JavaScript

I have a list with a title and a url. I'm trying to add a new url using this function function addListItem(url, listname, metadata, success, failure) { // Prepping our update var item = ...
1
vote
1answer
81 views

Custom Ribbon Action - Disabled with Selecting Document Set

The custom action enables/disables when a list item or folder is selected/deselected. The issue I'm running into is when a document set is selected, the custom action remains disabled. The logic: ...
0
votes
0answers
16 views

How to interact with a SharePoint 2013 page in edit mode

I'm new to the SharePoint 2013 Javascript API, so I'm still bumbling in the dark, trying to figure out how to write some javascript code to interact with a Sharepoint 2013 page in Edit Mode. ...
0
votes
0answers
10 views

Fix Required Field Titles broken by December 2013 CU [duplicate]

So I deployed SP2010 SP2 A couple of weeks ago to fix the XSLT Compile Time-outs that were introduced in SP2010 SP1. Things seemed fine but then we noticed our automatically started Workflows on ...
0
votes
2answers
65 views

ExecuteOrDelayUntillScriptLoaded(codetorun,SP.js) for entire script function

If you look at below code, I have used executeordelayuntillscriptloaded at start of my script so that it will run only after that file is loaded. But this breaks some functionality. Can you check this ...
0
votes
1answer
40 views

Javascript on masterpage returns undefined

_spBodyOnLoadFunctionNames.push("FetchURL"); function FetchURL() { // Custom JavaScript methods var ctx = new SP.ClientContext(); ...
0
votes
1answer
40 views

Get Context through REST call

I know that in SharePoint 2013 with JavaScript, you can load the current context like so... var context = SP.ClientContext.get_current(); var user = context.get_web().get_currentUser(); ...
0
votes
1answer
40 views

Sharepoint Hosted Permission (SP 2013)

I am developing a test REST app currently, the app is sharepoint hosted and is being developed and deployed to the SP site without Sharepoint installed on my Machine. The app is meant to take in a ...
1
vote
1answer
79 views

Retrieving list items using Javascript and Caml query

Hi guys I'm new to SharePoint dev and working on a project to retrieve list items. I have followed the instructions from http://msdn.microsoft.com/en-us/library/office/ee539350(v=office.14).aspx and ...
0
votes
0answers
16 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 ...
0
votes
0answers
45 views

Custom Ribbon Sharepoint 2013 Custom Action with javascript

I would create a custom ribbon in Sharepoint 2013. I created my APP-Sharepoint Hosted APP and I have added my Custom Ribbon . This Custom Ribbon, with a click under it, must open a dialog box or ...
2
votes
0answers
26 views

Get distinct values via mechanism used when clicking “Show Filter Choices” on a Sharepoint list using Javascript

As many other people on this site seem to need, I'd like to get an array (or equivalent) of the distinct values in a field for a list. The canonical way of doing this is to retrieve the entire field ...
1
vote
1answer
43 views

Sharepoint 2013 delete AttachmentFiles by JS

how can I delete an AttachmentFiles of a list item by Javascript? (with REST or using SP.RequestExecutor) Thank,Nk
0
votes
1answer
58 views

Add item to list using button

I try to create button that will be add item to the list. Unfortunately I do somethings wrong. My programming skill's are at beginner level. I have list "List" with only one field Title (for test) - ...
0
votes
1answer
51 views

How to Get User Active Directory Groups in Sharepoint Online

I can't find any documentation or a way to find if a user belongs to an AD group with Javascript neither with the REST API or with the client model JSOM. I have a page in a Sharepoint site and I want ...
0
votes
1answer
26 views

Add icon hyperlinks to grouped SP2013 list view

In SharePoint 2013, I want to take the grouped view of a list and add 3 buttons to the left of each item. In previous versions of SharePoint, I would have duplicated the list view using a DVWP but ...
0
votes
1answer
26 views

Wait for completion of SP.RequestExecutor [duplicate]

I am using SP.RequestExecutor to add attachments to a list item. I followed Can't upload a non-text file to SharePoint App via REST API I need to wait the completation of the asynch call of ...
0
votes
2answers
24 views

How to get the root site collection programaticallty via SSON and ECMA?

We have created web application. Within this we created 2 site collection: Site collection 1 - http://pcname:3333/ Site collection 2 - http://pcname:3333/sites/sc2 Within each site collection we ...
0
votes
2answers
24 views

Ribbon javascript function reference

I was wondering whether there is somekind of reference available with the javascript methods called for each of the buttons in the ribbon. Question behind the question: I want to make a button on a ...
0
votes
1answer
24 views

Sharepoint list to XML including the headings?

We store data regarding Scrum sprint retrospectives in a SharePoint list. I have to create a chart for visualizing this information (which is not part of this topic/problem), so I need to somehow ...
1
vote
1answer
25 views

modify view of list in JS

I have this code: window.SFW = window.SFW || {}; window.SFW.urgentAlertsItem = { customItemHtml: function (ctx) { var urgentAlertsItemHtml = "<div class='urgent'><h2 ...
0
votes
2answers
71 views

Unable to get property 'get_current' of undefined or null reference

$(document).ready(function () { var count = 0; retrieveCurrentListProperties(); function retrieveCurrentListProperties() { clientContext = new ...
1
vote
1answer
27 views

Displaying Calculated Column hyperlinks as text in filter drop downs

I have a list which has employee IDs as a field. I then have a calculated column which takes this field and uses it to link to our company-wide employee directory. This means I can hide the employee ...
0
votes
1answer
35 views

JSOM CSOM query only get dates that are not passed todays date

I have a list which contains an end date, I want to query this list and only collect the items which end date have not passed todays date. Once this has happened I want to count the new queried table. ...