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)

0
votes
2answers
12 views

CSR only works on a List View when same code is present in a Script Editor web part and also a JS Link

I'm still pretty new to SP and I've been trying for weeks to get JSLink to work on a SP 2013 List View (no formatting would ever show up and I didn't know if it was the javascript code itself or the ...
0
votes
1answer
15 views

Opening a URL in current window by using window.open in SharePoint 2013

I have a question about opening a URL in current window by using window.open. It is a master-page in SharePoint 2013 The condition is : If current window is the site AAA, user opens the site BBB in ...
1
vote
2answers
32 views

jquery.done runs before when - deferred promise

I have placed a SEWP in an editform and the code is supposed to do the following: check if the logged in user is site administrator and web administrator - if not then hide a specific field. These two ...
1
vote
2answers
21 views

Using JSLink to manage and output list groups and items

so I am currently using JSLink to change the look and feel of my List view, but am getting a little stuck in getting the HTML hierachy of my elements right. This is my current code... function ...
1
vote
1answer
16 views

Custom calendar colors when move forward or backwards in months

I've been able to get custom colors working on my calendar, but when I go to previous month or next month the colors don't persist. To attempt to remedy this I've tried making a click event to get ...
0
votes
2answers
14 views

Email address of Logged-in User using JS Link - undefined

Someone can help me? I use JS link for list and need return current user email, I used script: var currentuseremail; ExecuteOrDelayUntilScriptLoaded(init,'sp.js'); var currentUser; function init(){ ...
0
votes
1answer
21 views

Javascript + SPServices while executing the code doesn't show a loading modal nor modifies a button attribute

basically this is my code $('#saveButton').click(function(){ showLoadingDiv(); $('#saveButton').attr('disable','disable'); }); function showLoadingDiv(){ ...
-1
votes
1answer
20 views

Get the proxy authentication once we click on a specific page

SharePoint 2013 request: we need to display the proxy authentication window once we click on a specific page link "/index.aspx" .... it can be done using JavaScript ???
0
votes
2answers
20 views

Scrip sample file? to connect sharepoint 2013 and sql server in a form

I want to create a template in sharepoint 2013 and connected to an SQL server table, so it will populate with the info entered in a form.
2
votes
0answers
33 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
3answers
67 views

javascript- How do I create a global variable among all pages

I implemented a toggle in my home page through javascript in content editor web part, the toggle has state between 1 and 0. Now I need the exact same toggle in all other pages of my site, but I'm not ...
0
votes
1answer
28 views

How to get SharePoint ID given only item URL?

Looking for the simplest possible solution, but needs to be JavaScript/jQuery if at all possible. I have an XML document that I am transforming using XSLT to render an HTML page. This XML document ...
0
votes
2answers
16 views

How can I link to the Upload Document page without using the GUID of the document library?

Currently I'm showing the Upload Document screen in a modal so my users can upload a document to a Document Library. The URL I'm calling to display that modal is this: ...
0
votes
1answer
42 views

How do I get all current users from a site

I need to get all currently active (not removed users) from a site. I have the following JS that gets all the users but some of them are old users that have been removed from the site (still exists in ...
0
votes
1answer
12 views

Accordian Jquery Events for Customised List forms

Want to understand how do we differentiate Submit/save event in customized list forms. eg: When we are in Section 1 the submit/save should correspond to data being submitted in section1 when we are ...
2
votes
1answer
44 views

Open modal dialog from webpart in the parent page

I have written a SharePoint application which is embedded in a page as an AppPart. Now I want to open a modal dialog in the parent page. This code opens the dialog only in the current AppPart: ...
0
votes
0answers
22 views

Limit checkbox selection in survey

I am currenly trying to implement a survey with a limit of checkbox selection. Out of 42 checkboxes, the user will only be able to select 8 of them. If more than 8 checkboxes are checked, there should ...
1
vote
2answers
49 views

Call Javascript function only after Success?

I need to alter fields if 4 lists when a button is pressed. I've created a single CSOM (javascript) block code that I pass a parameter to. This being ID of item and the ListName. Then I call the ...
0
votes
1answer
7 views

Javascript search is working in sharepoint 2007 and not in sharepoint 2013

Javascript search is working in sharepoint 2007 and not in sharepoint 2013. Is there version problem?
1
vote
0answers
18 views

structuring Javascript for sharepoint code

I have been reading many articles and going through many video tutorials, they explain almost all patterns from javascript (Module pattern, Prototype pattern, Revealing Module pattern and etc) with ...
0
votes
1answer
24 views

Custom code in webpart HTML editor

I need to implement a simple show/hide div when a user clicks on a specific area of a map in sharepoint. The following code works perfectly in all browsers, but when i paste it exactly as is in the ...
0
votes
2answers
42 views

How to collapse Ribbons bar when page is loaded?

When user click on an item display view (DispForm.aspx) the "View" ribbon is always expanded by default. It is annoying sometimes. How can I to make it collapse (not hide) by default? When user need ...
1
vote
1answer
35 views

List all page under sub site with Sharepoint CSOM

I try to get all pages under a subsite with javascript. I'm very new to Sharepoint. I built an object to handle these queries, but i can't retrieve the pages. I can get the Documents list. Please ...
0
votes
1answer
33 views

Getting displayed month as an integer from fullcalendar

I wanted to fetch the current displayed month from fullcalendar with the following code: function GetCurrentViewedMonth() { var date = $('#myCalendar').fullCalendar('getDate'); var ...
1
vote
0answers
15 views

Close modal after form have “saved”

Im trying to trigger a page reload after my editform is done. I know that I can create a js function, "presaveitem". But this is called before the item is saved. I need to trigger some custom JS ...
0
votes
0answers
18 views

One script blocks other

I have been developing a workflow app on our SharePoint 2013 site. I have two scripts that I want to add to the custom new item form. Each of them (if only one is present on the site) works fine. The ...
0
votes
1answer
40 views

SharePoint My site & Delve Javascript Injection

I have done Branding through Javacript Injection (Custom Action ) in Office 365 My site. Now office Default my site about me page change to Delve. In that Delve page (Me.aspx) my javascript ...
0
votes
1answer
10 views

Image Overlay with Text using javascript in Sharepoint referencing to a “List Library” (adjust frame size)

Below is my code for displaying images with text overlay (referencing from one of my list). <style type="text/css"> .myFrame1 { position: relative; overflow: auto; } .myFrame1 li { ...
0
votes
1answer
29 views

How can I set different event color that are fetched from SharePoint list?

I'm developing sharepoint hosted app that can fetch events from sharepoint list and put on fullcalendar monthly view. I have suceeded to fetch the events but all calendar events have the default ...
0
votes
0answers
27 views

Get listitem through another listitem on the same row (select changed)

I'm sorry about the mess! but here I go My sharepoint list has 3 columns= Title, Priority, Status I want to get all the Status items into a dropdownlist, and when i click any of these Status items i ...
0
votes
0answers
32 views

Get Taxonomy Terms, GUIDs, Synonyms (Other Labels) into Array within a SharePoint Page (not App)

I am using the code below to get terms (Later I will push these into an array). This is based on this article: http://www.vrdmn.com/2012/12/working-with-taxonomy-and-javascript-in.html It is pushing ...
1
vote
0answers
10 views

Save the Webpage content as document to Document library in SharePoint 2010

We have a requirement to save the webpage content as document (PDF/XPS/Image) to SharePoint Document library on a button click. Only client side scripts (Javascript/Jquery) are allowed to acheive ...
0
votes
0answers
13 views

Prevent Full Calendar from rendering on Next click

I'm just trying to make it so when the user clicks on the next button to advance months how do you make it so the calendar does not refresh the data and render it? I have tried lazyFetching but have ...
0
votes
2answers
41 views

Should we consolidate all form customization javascript into one file?

On the project I am working on (SP2013 on-premise), almost all the form pages (Newform.aspx, DispForm.aspx and Editform.aspx) have added a Script editor webpart with JQuery to customize form layout ...
0
votes
1answer
25 views

Get User Password property

How to get User Password property to make Log in the applikation in javascript in SharePoint hosted app. I tried to write user.password but i coudent find it. Please help.
0
votes
1answer
75 views

Jquery fullcalendar - how to make current month (days) unselectable

I am building a SharePoint-hosted app in SharePoint. Basicaly it is a time planning app. I used a jquery calendar plugin (fullcalendar). My question is I have a "lock" button. When user clicks the ...
0
votes
1answer
68 views

JSOM: Limit calls to SP.ClientContext executeQueryAsync with promises (Angular example)

I have asked myself this question several times before: Is it possible to have a JavaScript function used multiple times from multiple locations returning a promise calling ctx.executeQueryAsync, ...
-1
votes
1answer
37 views

Remove user from group Javascript

Hi I followed another thread but cannot get the following code to work. I changed Line 8 from web to oWeb, error seems to be around line 8/9 I'm trying to remove a user from a group. function ...
1
vote
1answer
16 views

KoSP binding failing (undefined) while another one works

I'm trying to link a list of my own creation up with KoSP. I created the list "Employees" which was used in the tutorial and got it to work perfectly, it consistently displays the Employee list and ...
0
votes
1answer
22 views

CAML query for the last document uploaded by a particular user

I'm trying to write a query using the JSOM to get the last document uploaded to a document library by the current user. The reason I'm doing this is because I have an upload button on a form and need ...
0
votes
2answers
35 views

pass parameter to 2nd function jsom

Hi I have the following code, how can I pass oList into function onQuerySucceeded? function lockMandaysItems(tID,oList) { var clientContext = new SP.ClientContext.get_current(); var oList = ...
2
votes
1answer
35 views

System.UnauthorizedAccessException when accessing list with JSOM

I try to get items from a list with JSOM. But I get a System.UnauthorizedAccessException with error code 2147024891. If I navigate and authenticate to the site with a browser I am able to access the ...
1
vote
1answer
57 views

Check if user is member of group

I have a SharePoint group name "Admin". Can someone provide me JavaScript code to check if the current logged in user belongs to this group? I have a query which I want to run based on this ...
0
votes
1answer
27 views

SharePoint sandboxed solution call javascript function from back end

I have created a sandboxed solution for SharePoint 2013 which contains sandboxed visual webpart. I need to call JavaScript function from back end. How can I accomplish this requirement? How can we ...
0
votes
2answers
19 views

Conditional formatting on list based on a user/person/AD entity

I have found many how-to guides on JavaScripts to render a colored line in a SP list based on a word in some column. I tried it with a 'person' (a people column) and it did not work. The value in ...
0
votes
1answer
23 views

Sp Services and calendar list

I have a SP Service call which uses GetListItems from a calendar list in SharePoint. I'm using it with the FullCalendar plugin. The events render fine that is not my question, my question is this: Is ...
0
votes
2answers
56 views

Getting the Timezone in Regional setting using javascript

I want to get the timezone in SharePoint, which is set in the regional settings. To be specific it is set as Japan Time. I am using javascript to fetch the time, but unfortunately I can't. I tried ...
0
votes
1answer
16 views

page create in Modal Dialog box and return parameter in sharepoint 2010

i need to create enterprise wiki page in Modal Dialog box ,when user enter name of the wiki page after click on save button.then it should return parameter.return parameter use for another process ...
0
votes
0answers
28 views

calling a javascript function inside a webpart

I have a site It has two content editor web parts In one I have a function like below function changeImageSrc(){ $("#someId").attr("src","somevalue"); }; Now i want to call this function from a ...
0
votes
1answer
32 views

Set values in Newform with CSR

I have a TestField (Single line of text) that I can return a value to while in NewForm.aspx. The problem being, the TextBox disappears and it only displays the returned text itself. (function () { ...