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
2answers
23 views

JSOM List Item Field Values

This should be an easy one but for some reason the answer is escaping me. I am executing a query with joins that includes projected fields (fields from one of the joined lists) using JSOM. Using ...
0
votes
1answer
29 views

Cross SiteCollection call with JSOM not working

I got a problem and my brain says "yes you made no mistake" but it doesn't work. Here is my problem: I have a SharePoint hosted App which has "Tenant read" permissions in the App Manifest. That ...
1
vote
1answer
15 views

jQuery not being loaded from master page

I added references to jQuery and bootstrap to a master page using the <SharePoint:ScriptLink> control: <SharePoint:ScriptLink language="javascript" ...
0
votes
2answers
32 views

Is it possible to refer to a field hidden in current view from JSLink attached to current view?

I have the following JavaScript code attached to List's JSLink property: (function () { var coloringFieldContext = {}; coloringFieldContext.Templates = {}; ...
0
votes
1answer
16 views

how can Sharepoint Person and Group field in custom new form display person name suggestions, after typing first few characters?

As with default new form of SharePoint, person and group field allows user to enter multiple names all at once . Also, my most important concern here is that while typing user name its relevant ...
0
votes
2answers
19 views

Custom Lists - set row background color in a list depending on a column value

Starting from this example: https://code.msdn.microsoft.com/office/Client-side-rendering-code-0a786cdd I would like to set the entire row background color depending on a column value.
0
votes
3answers
38 views

pop up message without using alert()

I have created warning messages using alert but it is showing site url also,so I need to create warning message without using alert in java script
0
votes
0answers
22 views

event onclick don't work on sharepoint

I have a problem with sharepoint 2010, I created a new render (.ascx) on sharepoint to be used as a graphical screen that I needed to change. My problem is that after the last deployment, events ...
2
votes
2answers
34 views

Is there any way to retrieve a Web by title using SharePoint 2013 JSOM without using the enumerator?

I need to get a subweb with a particular title using JSOM. So far, the only way I can see to do this would be to use code similar to the following: function getStuff() { var oWebsite = ...
0
votes
1answer
19 views

SharePoint 2010 Preloader

I'm wondering if there is any possible way to add a pre-loader like jQuery plugin to SharePoint. Not like when the page is fully loaded, show a loading gif. But something similar to SharePoint dialog ...
0
votes
0answers
19 views

Webpart not functional using custom JS

So i finally finshed my dynamic sharepoint page and everything works perfectly untill I noticed that my calendar (added as a SP webpart) is not working. When i remove the JS it works again. I have no ...
0
votes
0answers
18 views

Need to show Popup showing whole content of web part [on hold]

I have a webpart on SharePoint online site. I have customized the site using bootstrap3 model. I need to write customized JQuery code such that if content on webpart exceeds 4 lines, it should trim ...
0
votes
1answer
20 views

SP.ClientContext.get_current() is returning the wrong AD username?

I'm logged in as the following user myintranet\svc_q_sp_farm. The "About Me" page lists my details as svc_q_sp_farm, however the following CSOM/JavaScript code returns Sharepoint\System as the user. ...
0
votes
1answer
33 views

Style selected item row in a connected List View Web Part - SP2013

Currently, a selected item in a connected LVWP is only indicated by a filled, black diagonal arrow icon. I would like to add background color formatting for the selected item row. Note: I am not ...
0
votes
1answer
20 views

JavaScript writted via Script Editor web part does not recognize page elements

In SharePoint 2013 I added a div on a default.aspx like this: <div id="myDiv"></div> Then I added a Script Editor web part on the page, and added this JavaScript: var element = ...
0
votes
0answers
23 views

Window.frameElement.commonModalDialogClose() after Link in new Target (IE vs. Firefox)

We use modaldialog to open popups with 2 images and when you click on one of these images, a new tab opens and the modaldialog close. In IE it works, in firefox only one of them, close dialog or new ...
0
votes
2answers
59 views

Hiding Document Library columns used by JS file (JSLink)

Good day, Currently I have a "schedule" list (document library) which is used to store vessel schedules. Shedules uploaded are Excel files, which have named cells linked to custom properties in order ...
0
votes
0answers
19 views

Migration 2010 to 2013 JavaScript

When I´m doing a migration from SharePoint 2010 to 2013 (2010 Compatibility mode) I get the following error: A button click (Custom Code WebPart) at the main page is not working. When I click on the ...
0
votes
0answers
17 views

SharePoint CSWP 50 Item Limit

Would anyone be able to suggest an approach for increasing the default 50 item limit returned by a CSWP? This is for a solution that uses a custom display template to render the results out in a ...
0
votes
1answer
25 views

Executing Caml Query without ExecuteQueryAsync and “The collection has not been initialized…” Error

I have been trying to use Caml Queries to filter SharePoint lists and return the number of times that a given value is found in the SharePoint list. Here is the part of my code that I've been having ...
0
votes
2answers
57 views

How to set the value for a custom field in a list?

I am editing the script and HTML for a Content Editor web part. My code opens up a Modal Dialog when a user clicks a link on my page. In the dialog, the custom fields I've defined for the list appear. ...
-1
votes
1answer
40 views

Calls to WebProxy without an app context are not allowed

From SharePoint 2013's default.aspx page (https://somecompany-public.sharepoint.com/pages/default.aspx) I'm trying to call a RESTful json API which lives outside the SharePoint domain, but getting ...
0
votes
1answer
35 views

How to include custom fields in clientContext.load()?

Loading some list items via var lists = web.get_lists(); var list = lists.getByTitle(listTitle); var listItems = []; for (var i in len) { listItems[i] = list.getItemById(itemIds[i]); ...
0
votes
1answer
20 views

Does JSOM offer an equivalent to SPQuery.CalendarDate?

I'm trying to get recurring items for a specific month from a list. Using the following, I can get the events for the current month: <Query> <Where> ...
0
votes
1answer
18 views

List.getItems(query) returning too many results [duplicate]

I have the below sample CAML query that I built using the SPCAMLQueryHelper: <Query> <Where> <And> <Geq> <FieldRef Name="EndDate" ...
0
votes
1answer
33 views

How to return multi-value fields via SharePoint Rest API?

After reviewing my results, I realized one of the sharepoint columns only returns one value. How do I get it to return each value from my Role Column? It should look like this: Title: FDA Program ...
0
votes
1answer
20 views

SP2010: Getting html ID from People or Group column

As I'm trying to inject Javascript into a list, I find it is difficult to get the right ID from a People or Group column. This is an example of the code it outputs: <div ...
0
votes
2answers
45 views

OpenPopUpPage to go to new URL on close

Currently my code is OpenPopUpPage('mydialogurl', RefreshPage) What do I need to change RefreshPage to be so that it moves to the new URL after my dialog closes? So far I can only get it to go to ...
0
votes
2answers
29 views

Javascript location

I am trying to create tabs using this code http://jsfiddle.net/yZYtL/ I have implimented the HTML and CSS OK but the I am unsure where the Javascript should go? I have an existing javascript in use ...
1
vote
1answer
37 views

How can I auto-populate field in add item Document Library?

I'm developing a SharePoint 2010 Foundation Farm Solution. I've created a Document Library (Attachments) with 3 custom field (A,B,C). I open a pop-up like image below with this code: function ...
1
vote
2answers
40 views

Parsing SharePoint's hyperlink format with JS

SharePoint 2010, at least, has an odd format for storing its lists' hyperlink fields on the backend, namely it uses [URL], [Description] "Well then what does it do about commas in the URL" you ...
1
vote
1answer
25 views

Select odd items in SP List, selectRowByIndex

I am trying to select odd items in SharePoint list using the following: for(var i = 0 ; i< ctx.ListData.Row.length ; i++){ if(parseInt(ctx.ListData.Row[i].ID % 2 !==0)){ SelectRowByIndex(ctx, i, ...
0
votes
0answers
16 views

Disable DataSheet view only on one specific ListView

I have setup a specific ListView with all the columns I need. I need to disable the Datasheet view on this ListView (called SubmittersList) then I need to have Datasheet view enabled on my other ...
0
votes
1answer
25 views

Specified argument was out of the range of valid values. Parameter name: index

I have the following JavaScript code which must load a TermSet from SharePoint managed metadata store. The code was working fine until Monday and suddenly stopped working with the error on the title. ...
0
votes
1answer
35 views

Selecting an input field on a newform.aspx path with Javascript without using jQuery

I'm looking for an object that contains the form field ids or something similar. Something similar to the _spPageContextInfo object for form fields. Anyone have an idea? EDIT: This code I'm using ...
0
votes
1answer
30 views

Sharepoint Online Javascript get calendar events using rest

Ive tried to fetch calendar events using this: _api/search/query?querytext='ContentClass:STS_ListItem_Events EventDate>10/10/2014 ...
0
votes
1answer
46 views

SharePoint 2013 custom Attach File button

I'm trying to create a custom "Attach File" button in my SharePoint 2013 New Item form. So far this is what I've done: HTML <div onclick="javascript:openpageindialog();" class="btn" ...
0
votes
2answers
29 views

Sharepoint 2010 JSOM run script under impersonated user account or elivated privilages

Secnario:I have a SharePoint list with two fields loginNme and message are stored. Based on logged in user I need to show different messages. This list has unique permissions i.e. only one particular ...
3
votes
2answers
73 views

SharePoint 2013 List View Accordion Render

We're looking to implement a Q&A section on one of our SharePoint sites. To make interaction easier on end users I've been looking for a way display list content differently. I stumbled upon an ...
0
votes
1answer
18 views

How can output Title, Email and phone from User Profiles

I found some code that outputs from user profiles and works but it only outputs Manager. How can this be changed to output Title, Email and Phone number? var managerName; $().SPServices({ ...
0
votes
1answer
13 views

SP2013 Multilinetextfield event?

When you edit text in a MultiLineTextField which allows rich text, SharePoint switches to "Format text", every time this happens our custom ribbons disappear (they are added with JavaScript). The ...
-1
votes
0answers
19 views

not getting getWebRelativeFriendlyUrl using sp.publishing.js. Same for getAllParentTerms

I am not getting getWebRelativeFriendlyUrl using sp.publishing.js. Same for getAllParentTerms. Code below: function getURL() { // Create an instance of the current context to return context ...
0
votes
2answers
73 views

How to retrieve files inside folder in document library using javascript

I need the code to retrieve files from folders in document library
1
vote
2answers
43 views

Sharepoint Date compare using Jquery

can anyone let me know whats wrong with following code var day = new Date(); var Today = day.getFullYear() + '-' + (day.getMonth() + 1) + '-' + day.getDate() + ' 00:00:00'; ...
0
votes
3answers
73 views

get the attachement files from REST API

I use REST API SharePoint 2013 to get the items from list: And and I want to get the Attachments Files, How can i do that? This the code : function getListItems(url, listname, query, complete, ...
0
votes
2answers
20 views

REST api Bad Request file replace

I'm using sharepoint REST api using JavaScript to replace a file in a doc library. Here is the url structure I'm using. <!-- language: lang-js --> props.webUrl + "/_api/web/lists(guid'" + ...
0
votes
0answers
49 views

100% CPU utilization on w3wp.exe for SharePoint web application

We have an SharePoint web application which is completely developed on Knockout JS,CSS and SharePoint REST Interface for accessing SharePoint List Items from client end.This application was stable for ...
0
votes
1answer
130 views

How to Sign-In with Sharepoint from the Javascript?

I used the following code to access the sharepoint from javascript var soapDataString = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' ...
0
votes
1answer
34 views

JSLink - SP not updating code

I have a .js file stored on the Site Assets library. Today I updated it (uploaded file of the same Name and replaced the old one). But the new code seemed not to work. After lot's of debugging and ...
0
votes
1answer
39 views

get items between do two date REST API [duplicate]

can i get the list of items between two date like ? var startDate. var EndDate. var queryGetDiscussion = "?$Date between(startDate, EndDate) "; Or using LT and GT.