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
1answer
30 views

Hiding Timeline on Task list causes full page refresh when calling manual refresh with JS

I am using JavaScript to programmatically call the _doPostback for a task listview webpart using this in my function: setTimeout("__doPostBack('ctl00$ctl39$g_7fb81f26_0047_4c65_9ed0_0c625b5bb5d2$...
0
votes
0answers
21 views

Auto Minify files on publishing SharePoint hosted app

I have created SharePoint Hosted app with some list, scripts and css. Now I want to minify my files. Can we automate minification of files on deploying or on publishing? Also can we apply ...
2
votes
0answers
168 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", ...
3
votes
0answers
29 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....
0
votes
1answer
34 views

Add java script tag inside HTML rich text editor field in SharePoint 2013

I am trying to add some Java Script/ Style inside HTML rich text editor field in SharePoint 2013, as we can add in content editor but it strips all script tags. I tried embedding script inside ...
0
votes
1answer
19 views

Sharepoint 2013 foundation – survey – How to check for the completion of a survey response?

I am using Sharepoint 2013 foundation. I have created a survey using the built-in feature of survey of Sharepoint. After a respondent has completed the survey and pressed the ‘submit’ button, I want ...
0
votes
1answer
670 views

Get user profile picture URL using ID CSOM

I am trying to get the user profile picture url for a user using some JavaScript, I am querying a person and group field in a list and getting the use id via some CAML Query. However the issue I am ...
-1
votes
3answers
47 views

Show/Hide fields in SP

The below code is JavaScript to show and hide fields. What I would like to clean up is and include fields in an array instead of individual if else statements(all Internal Fields - All External Fields)...
0
votes
1answer
30 views

Jquery for document querying

How would one go about finding the correct JS/Jquery methods to accomplish the following? I would like to retrieve the URL parameter passed to the page(the parameter being projectCode) and then using ...
1
vote
2answers
30 views

JQuery add class to url when on page in current navigation menu

I'm currently using the SharePoint Web Control spnavigationmanager to create a navigation for sites that are easily configurable by going to Site Settings > Navigation and making changes there. I'm ...
0
votes
3answers
2k views

Cascading dropdown not working

I am trying to get cascading dropdowns to work on a list, but I seem to be missing a point somewhere. Please help me out. I have added jQuery and jquery.SPServices to my masterpage. The dropdown ...
-1
votes
1answer
23 views

Need Help with SP2010 calculated or scripted field based on multiple other colums of data

In a SP2010 environment, I have a couple challenges. I have a list of records that I need to add a calculated field (we'll call this column "STATUS Ratio) for each persons record. Each record has ...
3
votes
3answers
52 views

Adds filecount to Document Set title

What is then easiest way to add filecount of Document Set display I know to can do CSR with REST call to get Item count, but is the information available?
9
votes
5answers
11k views

Query SP2013 Managed metadata term store

I was wondering if it is possible to query the Term Store via the REST API or Javascript Client Object Model in SP2013. I can't quite seem to work out the naming scheme for the REST API to discover ...
0
votes
1answer
740 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: ...
5
votes
1answer
8k 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]); context....
1
vote
1answer
2k 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 ...
0
votes
1answer
4k views

SharePoint Conditional Formatting without using Designer

I am trying to apply conditional formatting to my SharePoint list based on a few conditions. For example I have a column (Month Needed) that the user selects a date from a drop down list in the ...
1
vote
1answer
25 views

JavaScript KeywordQuery Search {Today-30} not working

I have a kerywordquery in JS that is working but when i add {today-30} it does not. This is working: (RefinableStartDate<=Today AND RefinableEndDate>Today) It does not when I add -30 days: (...
0
votes
1answer
35 views

JavaScript implemented in SharePoint 2010 not working in IE 11

I'm trying to get this JavaScript code (borrowed from sunnyape: https://junestime.wordpress.com/2013/02/01/add-table-of-contents-to-a-wiki-page-in-sharepoint-2010/comment-page-1/) to automatically ...
1
vote
1answer
618 views

Pass NewItem ID to Callback function from NewItem form

I have a rigged a link to call the NewItem.aspx form in a dialog. When the User clicks 'Save', I would like to return the new item ID in the callback function. How is this achievable? <a href='...
2
votes
1answer
30 views

use/install of sp.js to call SP.Utilities.Utility.SendEmail

I believe the SharePoint server I am using has sp.js installed on it, as we can use _spPageContextInfo, but I cannot use the resource SP.Utilites.Utility.SendEmail. I.E I am getting an error, stating ...
0
votes
1answer
53 views

Print the content part of DIV in SharePoint 2013

I`ve researched a lot and spent more than 24 hours on it, but what ever reason adding the following in Content Editor WebPart on SharePoint 2013 List page, doesn't does the job as expected. ...
0
votes
1answer
13 views

How to know from which View the Edit form was invoked

I want the edit form to behave differently on different list views. Therefore I have attached JavaScript to the list edit form. The problem is how can I differentiate from which view it was invoked?
8
votes
3answers
2k views

Replace semicolon delimiter in a Lookup column on the list view

When selecting multiple values, the data is separated with semicolons. When many values are selected it starts looking cluttered. Is there any way to have each value on a new line? For example, ...
0
votes
2answers
30 views

Add default value to the site column inside content type using javascript Sharepoint 2013

I am creating some site columns using javascript. And also I am creating content types. I am attaching these site columns to the content type with the <FiedRef> tag. But I want different default ...
3
votes
1answer
638 views

SharePoint 2013 App Office 365 copy list item

I try to build an SharePoint hosted app, have started with a custom menu action. When I choose it I want to copy the selected item and automatically change some metadata for it. Problem is I can't ...
1
vote
1answer
26 views

Sort by Date Descending in JS Search

I have a KeywordQuery in JavaScript. The items returned are by date ascending. How can I change this to date descending? var keywordQuery = new SharePoint.Client.Search.Query.KeywordQuery(...
1
vote
0answers
21 views

Check if a List exist with JavaScript [duplicate]

How do we properly check if a list is not null? var ctx = new SP.ClientContext(baseUrl) var targetList = ctx.get_web().get_lists().getByTitle("ListName")
0
votes
0answers
27 views

How to query the Active tasks?

Hello i query the task for the current user with a html file and the according javascript. This works and here is the code: var context = new SP.ClientContext.get_current(); var userSessionManager = ...
-1
votes
1answer
42 views

Convert String as Property

var listType = document.getElementById('ddlLists').value; "ddlLists" is an Id for a dropdown list and "listType" variable is having the selected dropdown list item as string type. i want that the "...
1
vote
1answer
794 views

400 (Bad Request) ERROR while trying to use JS files in Content Editor Web Part

So, I added some code in Content Editor Web Part and code is started like this: <script src="/<MyURL>/_layouts/15/SP.Runtime.js" type="text/javascript"></script> <script src="/&...
0
votes
1answer
628 views

Error:Input string was not in a correct format. (Javascript)

I'm using SharePoint 2013 online and trying to save a item to a folder content type in a document libary I think the code is nearly rigth but i am getting this error when i hit save button have anyone ...
1
vote
1answer
2k views

Uncaught TypeError: Cannot read property 'toString' of undefined

I have implemented the jQuery UI autocomplete functionality on a input field using JSLink. It works like a charm when I test it using Internet Explorer 9, 10, 11 and Chrome. Some users are however ...
1
vote
1answer
51 views

How to change the text to bold and color in survey in SharePoint 2013

I want to get the text bold and underline and want to change some text to red color I am trying like the below code but still not changing anything <script src="/../IT/SiteAssets/jquery.min.js">...
0
votes
1answer
637 views

ExecuteQueryAsync not following through to the success/failure function, javascript

I've got a function that checks if a list item (setting) is true and then changes the setting which it does correctly but doesn't execute the second ExecuteQueryAsync functions. In debugging it jumps ...
3
votes
3answers
656 views

Get url of ALL lists on a SharePoint 2013 site using JSOM

I'm trying to retrieve the url for all lists on the current SharePoint site. I've managed to get the title for each list, I've also found resources explaining how to get the url of one specific list. ...
1
vote
1answer
25 views

Change site column type without losing data content

I have site column named : "Review Type", (Text field):it's a choice betewen defined text like : Annual, Adhoc, Major Changes..., now I want to change it to choice field(Annual, Adhoc, Major Changes......
3
votes
2answers
1k views

Passing the Sharepoint Logged in user credentials to a REST API Call

I am having issues passing the current logged in user's credentials in to a REST API call. Here is the scenario: I have a SP 2010 hosted site that has a web part that makes a REST API call to ...
0
votes
0answers
39 views

Promoted links - Apply a different style instead of Square Tiles

I need to display a navigation element in a page other than Global and Left Navigation, so the idea blinked in my mind is Promoted Links, very useful feature of SharePoint 2013. But the challenge is, ...
3
votes
4answers
725 views

Javacript only executed on first page load

I have javascript code included in my sharepoint site. When I load the page the first time, it is executed, but when I load it the second time, it is not running. It get's loaded in correct order but ...
0
votes
1answer
112 views

Set Content Type of New List Item Using JSOM

I am trying to add folders to a library using JSOM. I need to set the content type of the new library items, however I am not finding the documentation on how to do that anywhere. var ...
0
votes
0answers
24 views

View Version History from SharePoint using VBA

new to SharePoint and at the edge of my knowledge (but not comfort zone - GIMME MORE) with VBA/Java(?) I basically want to look at a SharePoint site and determine the version history; This, but with ...
1
vote
1answer
29 views

Save Excel file in SharePoint 2013 using javascript from out of SharePoint webpage

How to save an Excel file to SharePoint 2013 from a javascript executing outside of SharePoint? I am struggling with this issue, There were errors like SP is not defined
0
votes
1answer
44 views

How can I add users to a list based on a Form?

In a webpart I added the following code : <script src="http://code.jquery.com/jquery-1.8.3.js"></script> <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script> &...
0
votes
1answer
30 views

Ribbon save action triggered even after using return false [Page Layout Edit mode]

I have an article page where I need to do some custom validations in Edit mode(page layout). I am trying to cancel the save action using return false but the page is still saved. $('span[id="Ribbon....
1
vote
0answers
25 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 ...
2
votes
2answers
1k views

How to use SPServices search sql query - getting malformed query

I am using the SPServices javascript library to make a search request to sharepoint 2010 search. I am trying this query: queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'...
0
votes
1answer
951 views

“Permission Denied” error in IE after adding content editor to form

A site that I have not modified in several weeks has suddenly stopped functioning in Internet Explorer as it has for the past few months. I have a content editor in my list on the New, Display, and ...
0
votes
2answers
49 views

PnP.js not working without TypeScript?

I downlooded pnp.js from https://github.com/OfficeDev/PnP-JS-Core/tree/master/dist was release monday for version 1.0.0 by Patrick Rodgers Microsoft I seen all the developments but the always had ...