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
12 views

Difference between SP.SOD.executeFunc & other methods

I am confused about the idea of SP.SOD.executeFunc and other ways of referencing JavaScript, like: SP.SOD.execute SP.SOD.executeFunc ExecuteOrDelayUntilScriptLoaded ...
2
votes
1answer
11 views

Relative JS file reference from a custom page

I have HTML page inside a folder in style library called: Employee.html, so the link is: /style library/MyProject/Employee.html, I have also JS file inside the same folder called Employee.JS, I added ...
0
votes
1answer
35 views

How to use the CSOM SP.Publishing.Variations.getPeerUrl method?

In this code, I am trying to get the corressponding french URL variation. I am using this CSOM api https://msdn.microsoft.com/en-us/library/office/jj954403.aspx But I can't figure out how to use ...
1
vote
0answers
15 views

Change permission of the multiple items

I'm trying to conditionally change permission of the multiple items in SharePoint 2010 Forms Library. I've found the working code in MSDN ...
0
votes
0answers
14 views

Open XML SDK for JavaScript [on hold]

I am creating excel spreadsheet by using Open XML SDK for javascript. used below script to add spreadsheet data. Open XML SDK Javascript var table = ...
0
votes
0answers
14 views

SP.UI.ModalDialog.showModalDialog(options); refreshes browser and closes dialog

I have created a page which uses a REST call to get the DefaultNewFormUrl and then I am trying to pass this to the modaldialog but for some reason the modal fires, starts to load and then the entire ...
1
vote
3answers
32 views

How should I add JQuery on custom page layout for SP2013?

I am working on a SP2013 on-premise farm and try to create a custom page layout. There are some JQuery function I need it render on particular custom page layout but not other pages. <script ...
0
votes
2answers
33 views

How to save item into list only once?

I am trying save the below into list in SharePoint, but each item is getting saved twice. I need to save only once. What's wrong? function sumcalval() { alert("save function called"); var ...
0
votes
0answers
15 views

unable to get Image Slider Picture Library using CSOM

Facing Error Unable to Get List,Please Help Me currently tying to create SharePoint Hosted App(Image Slide) on my AppDev Site https://akki.sharepoint.com/sites/appdev I have Created Picture Library ...
2
votes
2answers
1k views

How to modify the sharepoint 2010 NewItem2 function?

In sharepoint 2010, I want to add javascript to the alerts popup window page, but I don't want to modify the actual layouts file. I want to dynamically insert javascript in it. Basically the button to ...
0
votes
1answer
47 views

How to get Sharepoint 2013 variation URL?

I want to create a toggle button for variations, so that when I am on the en or fr page, and I click the button it takes me to the other page. But I can't just change the en to fr, for example, ...
0
votes
0answers
12 views

Why is init.js using a synchronous XMLHttpRequest?

Newer version of the Chrome browser are shouting warnings when the XMLHttpRequest object is being used synchronously. We all know that we must not block the main UI thread with unnecessary synchronous ...
0
votes
0answers
12 views

Chrome Ends Debugging Session

I'm writing a SharePoint 2013 application in Visual Studio 2013, and I have an issue debugging in Chrome. The standard setting appears to be that the VS2013 debugging session ends automatically if I ...
0
votes
3answers
29 views

How to update list items using JavaScript Object Model in SP 2013

I am trying to update list item's value through JavaScript object model in SP 2013. When I call set_item('fieldname','mvalue'), it does not throw any error, but it fails to update. How to ...
0
votes
2answers
76 views

JSLink - SP not updating code [duplicate]

I have a .js file stored on the Site Assets library. Today I updated it (uploaded file of the same Name and replaced the old one). But the new code seemed not to work. After lot's of debugging and ...
4
votes
3answers
30k views

Get current user in Client Object Model with javascript?

var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); ctx.load(web); var user = web.get_currentUser(); alert(user); I used above code to get the current user using JavaScript, but I ...
0
votes
1answer
31 views

Issues with height when setting app part width and height via postMessage

I'm currently using the postMessage function to set the width of my app part which is working however I've got a few issues with height. The height is set using $('.container').outerHeight(true); ...
0
votes
0answers
18 views

Freeze the header columns for list in SharePoint

I'm working with a piece of code that are supposed to "freeze" the header column so when user has to scroll down, the headers remain visible and the user know what he or she is looking at. I have ...
0
votes
2answers
41 views

Counting the number of times a Specific value appeared in a column of a list

I have a list with column status. Some of the items in the list are approved. I need to count the Total number of approved Items. I have to do this using javascript..
0
votes
1answer
29 views

How Can I Pull data out of a SharePoint list from embedded code on the same SharePoint Domain Using SPservices and Javascript/Jquery?

I am trying to pull data from a column in a list. The list is in the same domain as the page that I have embedded code in. Here is the code, I have removed several of the functions that do not have ...
3
votes
1answer
84 views

How to reference the Site Collection URL inside the src attribute

I added a custom script to my "Style Library" folder under a site collection. The site collection URL is http://servername/HR. So to reference the script inside my master page I wrote the following: ...
1
vote
4answers
65 views

Best practice location to deploy CSS/JS/image files

For SharePoint development, I am used to placing all the images/CSS/JS files into the mapped layouts folder (..\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS) using Visual Studio. ...
1
vote
0answers
30 views

JQuery does not work anymore when refresh the page SharePoint 2013

I want to change value of span by jquery (selecting by ID and CSS). The script works, but when I refresh the page, it does not work anymore. I want to change the value 0 which CSS is ...
2
votes
1answer
43 views

Custom calendar display template / JS Link

I'm looking for a nice custom calendar. Display template or jslink, doesn't matter. Something like that would be awesome: http://deviprsd21.github.io/Calendario/index2.html Has someone tried to ...
0
votes
0answers
31 views

Issue facing for Sharepoint online Authentication using javascript

Using the code functionality in the link Code to authenticate SharePoint online users using javaScript. I am facing an issue that- ajax call for Microsoft Login service which uses a soap request , ...
0
votes
1answer
805 views

unable to get property 'getEnumerator' of undefined or null reference error

When i try to retrieve list items in sharepoint list using javascript i get the error my code <script src="/_layouts/MicrosoftAjax.js" type="text/javascript"></script> <script ...
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 ...
1
vote
1answer
1k views

Access ListItem.Properties from Javascript COM

Is there a possibility to access the ListItem.Properties from the Javascript COM? All I'm seeing is the possibility to read all Fields. There also is the funny [SP.ListItem.LoadExpandoFields()][1], ...
0
votes
1answer
964 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, ...
1
vote
1answer
488 views

REST API ItemCount on oData BCS List

I have a list generated from a BCS oData provider and I am attempting to get the number of items in the list so I can generate a $top on my request rather than bring back only the 100 item generic ...
1
vote
1answer
19 views

ModalDialog on Dialoge close run javascript

Hello Iam coding a Sharepoint Solution with a Application page. In this Page i created a ModalDialog to open when a Button is clicked. The Problem is I want to run java script when the Dialog is ...
2
votes
1answer
68 views

Modify list view column titles in a view without changing the list columns

I have a page that contains list view web part. I want to rename the column titles. I have used the following JS script, however it only shows if I click on it. Also, the id of the list view title ...
1
vote
1answer
968 views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
0
votes
1answer
24 views

Customized list form vs javascript & html solution in SP2010

I have one requirement in which we have to enter the q1,q2,q3,q4 details for 3 consecutive years for three categories, that means total 36 fields. There are some other fields similar to this. So total ...
0
votes
1answer
586 views

A script on this page may be busy, or It may have stopped responding

there is one webpart on page that rotate the images so i added a jquery to rotate images and its working fine but after sometime it gives error like A script on this page may be busy, or It may have ...
5
votes
2answers
226 views

Get UserData - JavaScript

As seen in the following picture, when I add a User-Filter to a page it allows me to choose the parameter to pass. In my case I used the Büro. How can I retrive this data from client using ...
0
votes
1answer
22 views

Unable to change a file's fields via REST

I've gone through quite a few blog posts, StackExhange/-Overflow questions, and also Microsoft's documentation, but I'm just unable to change the fields of a file via REST in Sharepoint running on ...
0
votes
1answer
414 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 ...
2
votes
1answer
625 views

“Type SP.ULSTraceLevel has already been registered” error while applying javscript to NewForm.aspx

I have a custom list in which I want to apply the javascript in new form of that list. Javascript loads the user profile property of the entered user in the people picker control. I am getting ...
2
votes
0answers
27 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 ...
0
votes
0answers
16 views

pop up info tab for custom list in sharepoint 2013

I am looking for a pop-up something like in the picture. (column info) Is it possible to use calculated column or Client Side Rendering for this kind of requirement. Anyone who have any idea ...
0
votes
1answer
451 views

JavaScript code block messing with drop-downs in Menu

I am using SharePoint 2010 and I need to place the following JavaScript code on a page to give me time in Rome <SCRIPT LANGUAGE="JavaScript"> function GetTime() { var dt = new Date(); ...
0
votes
0answers
21 views

How to add events to Ribbon Buttons

I want to add custom actions to my save or check-in buttons when a page is in edit mode. The IDs from the buttons I want to add events: ...
0
votes
1answer
13 views

Custom property for people profiles

I have added 1 new property to people profile named "DepartementTest" and filled it out foreach user. I have added my new property to my custom display template. I have built a people-dictonary and ...
1
vote
1answer
26 views

How to get the List item Id in javascript while in the display form

Is there is a way to retrieve the List Item Id (ID) that you are currently viewing (Display.aspx from) in javascript. I have searched through ctx and the _spPageContextInfo but have not found any ...
1
vote
3answers
2k views

How to get sharepoint userid from login name?

Hi I am trying to retrieve current userid _spuserid from login name.How can it be retieved? var userid=Function??("domain\name"); Any idea?
0
votes
0answers
11 views

Set client side choice field to stored value via JSOM

I am using Angular on top of SharePoint for an application. One of the fields I have is a choice column. I am able to get the values and store them in SharePoint/accessible via REST in my create form, ...
0
votes
0answers
32 views

JS Link View Overriding for date

I have a date column in my custom list. When i try to override the view of the field by using the TemplateOverride Function, my Javascript wont work on! The same problem occurs for Multiple Choice, ...
0
votes
1answer
235 views

SharePoint 2013 lookups with more than 20 items as select or input?

So I was reading about doing some JavaScript to manipulate the default forms for our lists and came across this: ...
0
votes
2answers
73 views

Cannot get ribbon button by Id through Javascript

I've got a delegate control which persists a customAction Tab onto every page of my host web. In the same Delegate control file, I reference a javascript file which I want to use to hide specific ...