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)

2
votes
1answer
2k views

Launch SharePoint 2013 Workflow w/Javascript

Looking to launch a list workflow from script tied to a button on a form. I've been referencing this article, as well as the code from example 5, and even tried using SPServices, but have yet to come ...
1
vote
2answers
21 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
3answers
465 views

Write items from a SP list to html

I've very recently picked up SharePoint and have a limited knowledge of programming so you'll need to bear with me here. I'm currently building on a development site collection in SharePoint Online ...
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 ...
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 ...
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 ...
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. ...
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 = ...
4
votes
2answers
333 views

Get MySite URL using ECMA

I am trying to get the URL of the logged in user's Personal site from another site collection. I am working on SharePoint 2013 online and using ECMA.
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
101 views

The value of the property 'MSOTlPn_ShowToolPane2' is null or undefined, not a Function object

I have a problem with SharePoint 2010 and Internet Explorer 11. The following error message appears when I try to open the webpart menu. In Internet Explorer 8 the wepart menu works as expected: ...
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
1answer
450 views

Grabbing a filter value via CEWP code behind

I have employed a Query String Filter to parse a value and send it to a chart web part. now I would like to use this value in a CEWP to provide an explaination/clarification for the chart, but the ...
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
17 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 ...
0
votes
1answer
32 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 ...
1
vote
3answers
40 views

Office 365 how to hide ribbion

I want to hide ribbon like :- Outlook, Calendar, People etc in below print screen marked in red round I want to hide only these options. Please advice.
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
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
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
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
1answer
426 views

loading multiple files from custom action with SP.ClientContext

I made a custom action that calls GetSelectedListItemAsString(). it should load the files 1 by 1 but somehow it does not load the files can somebody help me with it underneat a code snippet of the ...
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 ...
1
vote
1answer
454 views

Column not found when creating list item with Javascript

I am making a SharePoint app with javascript. I am trying to add a list item to a list I have defined in Visual Studio. I have done this just by adding a list in the solution explorer, and I made ...
1
vote
1answer
1k views

_spPageContextInfo is undefined in client web part

I have created a client web part for a SharePoint-hosted app that I am creating. The app makes use of the clienttemplates.js library in SharePoint to render user presence (Lync) in the web page. I am ...
2
votes
1answer
784 views

How to open file in adobe reader using command line without checkout from Javascript?

I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
2
votes
1answer
182 views

Adding 2 Caml queries in same executeQueryAsync

Is it possible to use two different queries to get to different lists and use them in the same executeQueryAsync() Something like this : var camlQuery = new SP.CamlQuery(); ...
1
vote
1answer
228 views
2
votes
1answer
558 views

Get selected items from JavaScript in the document library view

I have a page in which I have placed XsltListView web part to show the view of the picture library. Above that view I have placed a link using Content Editor Web Part which redirects to other web ...
2
votes
2answers
87 views

How to get the listname in a custom display template for a content search webpart

I cant believe that Sharepoint does not have a managed property for list name, neither a Crawled property I can map. Seems weird to me. I have a display template that renders results in a Table ...
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
1answer
729 views

Add custom web application/page which uses files from other folders

I've created a JavaScript web browser game. The HTML page, Game.html, within folder Game references several other JS/jQuery/CSS files stored in sub folders. I simply want to add the Game folder, ...
3
votes
2answers
107 views

SharePoint online refer custom css and javascript in MasterPage (Site Assets)

How to add references to css and js files in HTML master pages. The files are residing in SharePoint libraries.
-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
3answers
86 views

Filtering Look up Columns with Javascript

I'm trying to find a way to dynamically filter a look up column on the new and edit forms in SharePoint 2013. I want to be able to get a value from the URL and use that to filter the look up ...
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
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
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 ...
1
vote
1answer
365 views

Obtain FedAuth Cookie with RST token

I've got a phone gap application which should contact ADFS with a RST to obtain a SAML token then should pass this token to STS to obtain a FedAuth Cookie which is finally used in the header of REST ...
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 ...
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
1k views

SPServices - GetRolesAndPermissionsForCurrentUser

I have a list where one group of users is not allowed to delete items but they have view and edit permissions. All items in the list contain an attachment. However, users are not allowed to delete the ...