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)

7
votes
0answers
201 views

When JavaScript runs

Working on an overview of all possibilities of adding JavaScript. Can someone confirm Custom Actions run **after JSLinks** By execution order: Page Scripts using <script> tags or scriptlink ...
5
votes
0answers
164 views

Bundle SharePoint JavaScript files inside SharePoint hosted app

We have a SharePoint hosted app. This app require some scripts from SharePoint; MicrosoftAjax.js, init.js, sp.runtime.js, sp.js, sp.taxonomy.js and sp.workflowservices.js. We load all these from /...
4
votes
0answers
62 views

Replacing SOD with fetch (handling JS library dependencies - *in the future*)

Anticipating a future, I am experimenting with User Custom Actions in the new Document Library View Microsoft has so kindly provided to the First Release Office365 tenants. Since there is almost ...
4
votes
0answers
240 views

'Permission denied' javascript error on modal window opening in IE8

While opening any modal window (NewForm, EditForm, custom or OOTB) on a SharePoint list in Internet Explorer I get few SCRIPT70: Permission denied errors. This causes problem with saving the ...
4
votes
0answers
212 views

socialManager.isFollowed(socialActor) only returning 0 or false, but never true

Any ideas why I'm only getting 0 or false, but never true for result.get_value()? // Set IsFollowed correctly. var clientContext = SP.ClientContext.get_current(); var socialManager = new SP.Social....
4
votes
0answers
8k views

Add New List Item with SPServices anonymously

I have an HTML5 + jQuery application with a built in contact form that I wanted to hook into Sharepoint, and Lists seemed an ideal way to do that. I used the jQuery library SPServices to get this up ...
3
votes
0answers
33 views

SP.WebProxy.invoke Alternative

I'm working on a SharePoint 2013 on premises Hosted App. The app needs to get data from an external REST endpoint from a web service on another computer. I've managed to get in Javascript the SP....
3
votes
0answers
248 views

How to stop a SharePoint workflow using JSOM

Let me preface by saying that I'm a relative newbie to this SharePoint stuff and am still fumbling my way around a bit learning from code examples where necessary. That being said, I have no issue ...
3
votes
0answers
79 views

SP's JavaScript function to create pagination

SharePoint 2013 here. I need to create a pagination of results I get from an external web service. I want to use the look and feel of SharePoints pagination: Ideally I could call SharePoint's ...
3
votes
0answers
191 views

ctx.CurrentItem undefined in new function

I am editing a item display template in SharePoint 2013. The following problem occurs: ctx.CurrentItem becomes undefined in a custom function. How can I solve this? Here is a little code snippet: ...
3
votes
0answers
236 views

SharePoint Edit Mode Javascript error in edit mode

I am not able to edit the page from the browser. I used to change and edit webparts when suddenly in the edit mode everything looks like it is locked/stalled. When I open the debugger tool, I saw a ...
2
votes
0answers
23 views

Display Multi-field Checkbox

I have a MultiField Choice list item. By default it displays: Choice 1, Choice 2, Choice 3, Choice 4, I would like it to display like the following. Choice 1, Choice 2, Choice 3, ...
2
votes
0answers
171 views

CSR: RegisterModuleInit without hardcoded JS filename?

Always looking to make CSR development easier... This the typical CSR programming pattern: We hardcode the filename inside the CSR file SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", ...
2
votes
0answers
106 views

Display 'Related Item' Field in a Task 'Edit' Form

Is there any way to display 'Related Items' in a task edit form? It's already available in the display form, but when you switch to edit, it drops off. Ideas?
2
votes
0answers
54 views

SharePoint 2013 - Add-in - JSOM - Create SharePoint Group

I am trying to create a SharePoint Group in a SharePoint Add-in, which has Full Control over the site collection, using JSOM. Here is my code: function createGroup(groupName) { var ...
2
votes
0answers
77 views

Starting List Item Workflow using Javascript on custom edit page

I have a custom edit page with some Javascript inserted using a CEWP. From this page I am calling a function to start a list item workflow on the current item being edited. I am using the following ...
2
votes
0answers
176 views

Sort ListView via Postback in JSLink file

I found out, that you can filter a list view in a JSLink File very easy by a postback: function filterList(ctx, filterField, filterValue){ __doPostBack(controlId, 'NotUTF8;__filter={' + ...
2
votes
0answers
124 views

Sharepoint Authentication via REST API

I would like to connect to Sharepoint via REST API and Javascript. Based on readings I've done, first you need to have Security Token, then you use this Security Token to get FedAuth cookies, ...
2
votes
0answers
1k views

ULS logs filling up with Error: Failed to get document content data

Our Sharepoint farm's homepage constantly generates these "High" log items, making other debugging difficult. As far as I can tell, it doesn't acutally cause any problems. Error: High - Database ...
2
votes
0answers
51 views

CSR - One function for every field in a View?

We all know how to define one template function for one field. SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ Templates: { Fields: { "[fieldname]": { ...
2
votes
0answers
48 views

How do I restore specific list item version using JavaScript?

How do I restore specific list item version using JavaScript? Is there any way to restore specific version of list item using JSOM or REST API in Share Point?
2
votes
0answers
35 views

What are the different ways to consume SharePoint REST using Javascript

I know of two ways, using ajax and using SP.RequestExecutor.js. Are there any other ways. Code snippet and information around performance will be appreciated.
2
votes
0answers
291 views

Copying attachments using JavaScript (JSOM or REST)

I've been able to copy documents in document libraries using the "CopyTo" method: https://msdn.microsoft.com/en-us/library/office/dn450841.aspx#bk_FileCopyTo I'm not understanding how I can apply ...
2
votes
0answers
228 views

Get all managed properties for search results javascript

I'm following this post on how to do a Keyword Query search in SP 2013. I'm getting the results items that I would expect. Now I need to display info about them. The results are a mix of several ...
2
votes
0answers
53 views

SharePoint look up value A (list number value) and hide Add New button if 2nd list count value B (list count) is equal or greater to value A

I have an InfoPath form displaying formation for a commuter sign up list called "Register Commute" I modified the Content Type Display Form and added a list called "Commuter Sign Up" which is ...
2
votes
0answers
109 views

How to create custom user profile properties using javascript?

Is there any way to create an user profile property using the sharepoint online javascript api? if not which is the correct way to provision custom user profile properties for an app Thanks
2
votes
0answers
585 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. ...
2
votes
0answers
61 views

How to exclude TaxonomyFieldControl from spell checker

I have a page layout with a couple of TaxonomyFieldControls on it. When I run the spell checker in the ribbon the taxonomy fields are getting flagged with spelling errors. I don't want the taxonomy ...
2
votes
0answers
285 views

unexpected response from server

I am using javascript to load data from list. But every now and then i get error Unexpected response from server Sometimes i get and sometimes i dont. I googled and someone suggested to free memory ...
2
votes
0answers
137 views

How to dynamically change the drawing path in Visio Web Access Web Part

I am wondering if there's any way to dynamically change the drawing shown by a visio web access web part. I have multiple drawings I want to show on a page based on what users click on the page. Any ...
2
votes
0answers
167 views

People Picker in sharepoint 2010 in Client Object model

I want to implement a people picker functionality in sharepoint 2010 with Client Object Model (JSOM), how to do it? Actually i have implementated in 2013 but the same code does not work on 2010.
2
votes
0answers
114 views

Options for caching client-side requests?

Does Sharepoint 2013 offer any options for caching certain client-side requests for different clients (like ASP.NET cache)? I'm already using localStorage, but that only caches data for a single ...
2
votes
0answers
151 views

Multilevel Audience Targeted Global Navigation SP2013

Has anyone set up Multilevel Audience Targeted Global Navigation SP2013? If I use term set I am unable to set security otherwise cannot set multilevel?
2
votes
0answers
163 views

SP2013: Tabular view incompatible with JSLink checkboxes?

I'm using a JSLink file to replace a "Single line of text" column with a custom checkbox. For some reason, when "Allow individual item checkboxes" is enabled my checkbox won't work - I can't even ...
2
votes
0answers
415 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 ...
2
votes
0answers
375 views

SharePoint InputFormTextBox returns javascript error while changing its position

I have created one aspx page for implementing the edit comments of the form. For this I am using the SharePoint InputFormTextBox control. I have a total of 4 Divs each containing one InputFormTextBox, ...
2
votes
0answers
29 views

Instrumenting search term in SharePoint2010

I know SharePoint2013 can capture this data better but in 2010, i am trying to capture exactly what terms people are searching for. I have analytics logic that i can call as javascript. My search ...
2
votes
0answers
2k views

How to get the return value of an on demand executed function?

I have a script file MyScript.js in the folder TEMPLATES\LAYOUTS\MyProject\Scripts which looks like this: var MyCompany = window.MyComapny || {}; MyComany.MyProject = MyComany.MyProject || {}; ...
2
votes
0answers
643 views

Install an app from the appCatalog using javascript CSOM

I'm trying to install an app in a site from the AppCatalog using the javascript CSOM I get the apps from the App Catalog using req.apps = SP.AppCatalog.getAppInstances(clientContext, oWebsite); I ...
2
votes
0answers
1k views

How to add the standard sharepoint list item context menu?

we have written a webpart that outputs titles of list items. We now want to add to each of those items the standard flyout menu (see the picture) below, but don't know how so far. Can you help us out ...
2
votes
0answers
1k views

Filtering SharePoint list items that have multiple values using jQuery

I have a SharePoint list that contains multiple columns of information. There’s a Category column that’s a look up to another list called ‘Category’. This is to produce unique ID’s for each of those ...
2
votes
0answers
107 views

changing language on application page

I am using following code to change the language of HTML form on application page: <asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> <...
2
votes
0answers
743 views

Programatically creating Discussion List Posts - and replying to them from Outlook

We are Programatically creating a Discussion List Post/Topic (using JavaScript) based on an entry in a custom list. The idea is to synchronize this Discussion List with Outlook. That does happen ...
1
vote
0answers
32 views

Updating item in list depending on choice

I have the following code : <div> <input type="radio" id="firstAppointment" name="choose-option" value="1"> <span> Subscription1 </span> </div> <div ...
1
vote
0answers
19 views

All methods to add JavaScript to SharePoint 2010 - Online

I am working on documentation of all methods of adding JavaScript to a page I have some blanks I can not test easily, does anyone know the answers? When Office365 is configured to NOT allow Custom ...
1
vote
0answers
26 views

Javascript - Modal to appear every day for 10 days

I have a modal which needs to popup once a day for 10 days - the images must appear in sequence. The modal hold an image which needs to change every day and loop over that 10 day period. I have a ...
1
vote
0answers
25 views

Replace “&amp;” in Autocomplete Text Bar HTML Source Editor (SP2013)

Every time a value containing an "&" is rendered, upon page refresh, another "amp&;" is added to the value; in effect, it's duplicating itself. I attempted to implement a solution I'd found ...
1
vote
0answers
17 views

New Office365 SiteContents : adds more items in menu

In new SharePoint the menu is in menuData.SettingsData: How can I adss new menu items?
1
vote
0answers
23 views

How to reference total count of columns & Items within a SPS2013 List on another List

Looking for the total count of Columns and Items from an existing SPS2013 list to be visible on another SPS 2013 list part of the same site collection.
1
vote
0answers
16 views

SP2013: SP.Result returns 0 when calling get_value()

Maybe it is a very simple fix for this but i have problem with retrieving the m_value from a SP.result. SP.Result {} m_value:false __proto__:Object constructor:function () customFromJson:function () ...