2
votes
1answer
77 views

SharePoint 2013 and javascript

What is meaning of OnDemand scripts and what is not-on-demand scripts? In SharePoint 2013, when do we use SP.SOD.executeFunc and when to use ExecuteOrDelayUntilScriptLoaded ? What is best practice?
1
vote
1answer
12 views

Return CurrentItem from context.Templates.Item JSLink

Any ideas on how to return from the Custom Item method when using JSLink (as if it was never called)? I want to do a check in this method and hide the row if the condition fails. I know I can do a ...
0
votes
0answers
9 views

Create a discussion list type based on the new display js file

Can anyone help me with how to create a discussion list type based on a new display js file? I do not want to modify the OOTB JS files of SharePoint.
1
vote
1answer
53 views

SharePoint Online 2013 Page Code Embed and Javascript - output disappears

I noticed I can't embed inline javascript in an SPO 2013 Web Part page, but can reference a library. I'm outputting a table from that js. If I put alerts that table displays but then disappears ...
1
vote
1answer
22 views

“Working on it” message - Handle event and hide some blocks

I edited master page, added some custom blocks. My problem is when opening the web site I see my footer and header blocks. How can I hide these blocks when "Working on it" block appears? Can I ...
1
vote
1answer
39 views

get_defaultViewUrl () not working in SP Hosted app

I am trying to get the default view url of a list in SP hosted app. Below is the code i am trying, on execute success method. spListobj.get_defaultViewUrl(); It is returning me this error : The ...
2
votes
1answer
52 views

SPFolder.MoveTo functionality in JavaScript

In SharePoint 2013 I'm trying to add a script to move a folder from it's current location to a different parent folder while keeping the rest of the file structure the same. I am adding a button to ...
2
votes
3answers
77 views

How to put an iFrame with a QueryString appended in its src in the ContentEditorWebPart?

I have a SharePoint site Page in which i need to put an iFrame element to display a web page.To achieve that I wrote some html and javascript within CDATA tag inside the Content section of a ...
2
votes
1answer
41 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.
0
votes
0answers
26 views

How to pull property and auto-verify/populate?

In SP2010, there was a "Department" field where I had to extract the department of a user whose name was already verified/resolved in people picker. The code was: var invokeAfterEntityEditorCallback ...
1
vote
2answers
186 views

Autopopulate form fields based on selection in people picker column using JavaScript

I have a custom list where user fills out profiles of others. There is a People picker column for "Name of employee" and when the user selects the person(people picker) in the form, other details ...
0
votes
0answers
30 views

Permission Denied JavaScript Error

I am attempting to place page viewer web parts on one of my firm's intranet SharePoint sites. For some reason, the page that is loaded through the web part won't function properly. The page itself ...
1
vote
2answers
83 views

Updating list items by JSOM

I am currently trying to migrate a list from one sharepoint to another. I did this a few months ago allready and there it worked not bad. But now I run into problems. The list is a discussion list. I ...
0
votes
1answer
46 views

Javascript/Ajax errors on custom master page

I have a custom master page using a few JS utilities like jQuery and skel.js that has been experiencing some errors whenever the page loads. The errors are transparent to the user, but show up in dev ...
0
votes
1answer
54 views

'OpenCalloutAndSelectItem' is undefined / 'ShowMenuForTrOuter' is undefined

SP2013 Enterprise, custom master page using skel.js and jquery Recently users have started receiving an error when trying to access the item menu revealed by the ellipses next to an item in a list. ...
0
votes
1answer
30 views

Pull data / Replicate list data form Moss 2007 version site to SharePoint Online version site

We have one requirement where we need to pull data / Replicate list data form Moss 2007 version site to SharePoint Online version site. Please can any one suggest what are the approaches are ...
0
votes
0answers
32 views

Aspx page that create filtered view based on argument

I use Sharepoint 2013. I have two lists generated by PS everyday. List A Client Col2 Col3 1 aaa bbb 2 ccc ddd And List B : Client Col1 Col2 1 Info1 Info11 2 ...
0
votes
2answers
72 views

Include js file in Page Layout, after jQuery file in Master Page

I'm trying to include a javascript file in my page layout file. I already have it inside the "PlaceHolderAdditionalPageHead" Content Placeholder, and it includes the file, however I need it to be ...
0
votes
0answers
4 views

Unable to get selected items using JavaScript from XsltListViewWebPart on Publishing page after published [duplicate]

I have placed xslt list view web part on publishing page. And above that I have placed one content editor web part to get selected items from the view. My JavaScript is: var ctx = ...
2
votes
1answer
114 views

CORS with SPServices + jQuery

I need to access from a different domaine on a mobile a sharepoint list. Here is my code, a simple get request : $.support.cors = true; $(function() { $().SPServices({ operation: "GetListItems", ...
1
vote
1answer
133 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 ...
0
votes
2answers
213 views

Reference to javascript file in Content Editor Webpart

I have site which is non root site i.e. url of site is: http:///sites/xxx I want to place a content editor web part and refer a link to javascript file which is stored in the Style Library. My code ...
0
votes
1answer
47 views

Error loading items of MicroFeed from javascript

In order to do some migration I have to read several lists from my SharePoint from the client (I do not have access to the server console). So far fo rmost lists this worked pretty well but now im at ...
0
votes
1answer
123 views

How to get the selected items of list in the javascript

I have one picture library, where several pictures are stored. In that picture library I want to put such a link that will download selected images. To achieve this functionality, I thought to prefer ...
0
votes
0answers
20 views

Sharepoint mobile view issues

I am working on Mobile View for SP 2013 site and I used some java script for better user experience, this java script works perfectly with IOS and ANDROID devices, when it comes windows phone like ...
0
votes
2answers
50 views

Getting all sites for user with permissions

I'm trying to get all sites for a user on which he has permissions. For this I'm using the search api. In a for-loop from 0 to totalRows. This is my request url: ...
2
votes
1answer
164 views

JSLink and Javascript Events

I have customized the view for my SharePoint 2013 List using a JSLink file but have not been able to get the buttons I added to the page to respond properly. They cannot find any DOM elements when the ...
0
votes
1answer
90 views

Need help troubleshooting JQuery call to workflow

Running SP 2013. I've got SPServices 2014.01 and JQuery 1.11.0 both copied to my site collection and loading in my masterpage, plus I've confirmed they're loading with the page in question. I've got a ...
1
vote
1answer
253 views

2013: Trying to pass jQuery user object to AngularJS

I am creating a SharePoint Hosted App and the default Visual Studio project uses jQuery to access the SP.clientContext to get_currentUser and save it in a global variable. To trigger an AngularJS ...
2
votes
1answer
460 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: ...
3
votes
2answers
317 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(); ...
1
vote
1answer
266 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
78 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 ...
1
vote
1answer
573 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
180 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
273 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
39 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
1answer
94 views

Javascript on masterpage returns undefined

_spBodyOnLoadFunctionNames.push("FetchURL"); function FetchURL() { // Custom JavaScript methods var ctx = new SP.ClientContext(); ...
1
vote
1answer
204 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
495 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
122 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
85 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 ...
3
votes
1answer
398 views

SharePoint 2013: Check Workflow status programmatically (javascript)?

I need to be able to get the status of a SharePoint workflow 2013 using javascript. My goal is to start in a loop for all selected items synchronously a workflow. For that I will check if the started ...
1
vote
1answer
520 views

Get Navigation Term for Current Page in CSOM (JavaScript)

I am trying to get the Local Properties for the Navigation Term that is currently being viewed. For example... If I navigate to http://sp2013/about/team I need to get the Local Custom Properties for ...
0
votes
4answers
694 views

Retrieve List Items Using JavaScript gives unexpected response from server

I'm extremely new to SharePoint and was recently experimenting with the client side object model. I've used one of MSDNS examples. however, I seem to be getting this error response : "request ...
0
votes
1answer
57 views

How to find Web Parts on the current page using SP.js

I am trying to find out the title of the current page with SP.js without having to get it from the DOM. Is there a way to find what Web Parts are on the current page?
1
vote
2answers
175 views

How to change the SharePoint 2013 logo image dynamically?

Is there any way to change the SharePoint 2013 logo dynamically, ideally via javascript? I have tried: document.getElementById("onetidHeadbnnr0").src="\path\image.png"; Also tried: div = ...
2
votes
1answer
297 views

How can I add a Site Actions menu in a SharePoint 2013 full size app

Question: How can I just add a Site Actions Menu to the default chrome control rendered with the full sitze app? Problem: in a SharePoint hosted full size app there is no Site Actions menu. If ...
0
votes
1answer
151 views

Show persistent status bar + form to update easily

I want to keep informed the end-users of my SharePoint site of any issue or relevant informations. Naturally, I would like to do so by filling HTML elements (input and select tags). Hence displaying a ...
0
votes
2answers
209 views

JS/JQuery Connect to SQL Server

Right now i am modeling a ClientWebPart outside of the SharePoint server. Although, i advised the client to let me on the server to do Code Behind connection, they said not right now. Server might ...