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
0answers
44 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 ...
0
votes
0answers
28 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
16 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
45 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 ...
0
votes
0answers
88 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
1answer
31 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 ...
2
votes
2answers
84 views

Creating document set and setting values with REST/listdata.svc

I have a custom document set type and I want to create a custom button on a calendar that allows my user to click a day and create a new set for that day with the date already filled in. I've got the ...
0
votes
1answer
45 views

Unneeded display template js files loading

I have several search results web parts on my page that all use custom display templates. Upon doing some performance testing I'm seeing several js files being loaded that aren't needed and I'd like ...
0
votes
0answers
26 views

JS Link date and time field

I have an edit form with some columns are locked. One column (which is locked) is a date&time column. It will locked perfectly. But the show the result and cut the last 0. So from 16:00 will be ...
1
vote
1answer
66 views

Javascript Object Model SharePoint 2010 Item Level Permissions With Group

I have been trying for some time now to do something that should be simple using JAVASCRIPT CSOM in SharePoint 2010. I have working code that can break list item permission and add a user to an item ...
0
votes
1answer
32 views

Help JS Link Problem

I need please help by my JS Link problem. I want to lock a column in a form when it has a value inside. To do this I try this code. It works but when I click on save the value in the title filed will ...
2
votes
1answer
115 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 ...
0
votes
1answer
70 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
0answers
15 views

How to target modal dialog when list is set to launch in dialog?

I have a script in a CEWP with a function that will open a modal form, with OK and Cancel buttons, when a list item is saved. When I have the list set to not launch forms in dialog, I can target my OK ...
0
votes
1answer
67 views

Get clicked item ID from list

I have a list with items. Each item contains a link to another page. If a user clicks on one of those items, the specific item should get updated with a date when he clicked it. Now I get a target ...
0
votes
2answers
47 views

ListItem.get_id() return “-1” after adding value in custom list

I am trying to add value in custom list of SharePoint using COM and Javascript. Code work file but i can't see any item added in list. also i got id of recently added item is "-1" This is my code. ...
0
votes
3answers
59 views

How can I get a userid with jQuery in SharePoint 2010?

I'm writing a custom form with HTML and jQuery so that I can then insert the captured information into a list, but I can't use the SPServices library. When I build the list using InfoPath, it ended up ...
0
votes
1answer
55 views

failed to load resource

When my site loads i get error in console Failed to load resource: the server responded with a status of 404 (NOT FOUND) ...
0
votes
1answer
48 views

Set Audience targeting on left navigation with Javascript/Jquery

I want to set Audience targeting on left navigation bar of SharePoint, though there are around 50 links on which i need to set the targeting on. Every time I take a template and restore it, I manually ...
1
vote
1answer
54 views

Get Field order from a list view : Javascript object model

I am getting the fields of a list view using the javascript object model view.get_viewFields() However, this does not return the fields in order which they are configured in the view. It just ...
1
vote
1answer
42 views

Javascript: Check Permissions Button in SP2013 Toolbar

I've been running into a problem with permissions of AD groups occurring within SP groups. It's a well-documented point of ouch that I'm struggling with. Ultimately, I want to loop through all the ...
0
votes
1answer
109 views

How to implement graphs / charts to a custom list in SharePoint 2013

How to implement a bar graph or pie chart for a custom list in SharePoint 2013? I have a custom list with the field: months I want to have a graph/chart to show the usage of the services.
2
votes
2answers
178 views

JavaScript client object model - get current user email id, first name, last name

I want to understand the difference between the following two methods to retrieve the current user email id: Method 1: function getCurrentUserEmail(){ var clientContext = new ...
0
votes
0answers
28 views

Telefon mask - Sharepoint 2013

How to write a telefon mask in Sharepoint +48 xxx-xxx-xxx. Does anyone know about it. The telephone mask should be on a field.
0
votes
2answers
54 views

Change NewFrom using JSLink

I have to customize the NewForm and EditForm using JSLink. Perhaps there is another way of doing this. So what I would like to know are these: How can I make a field required or not depending on ...
1
vote
1answer
37 views

Save/Leave Event after editing a Page

I need to fire some functionality from javascript when a user has finished editing a page and saves it or leaves the editing mode. Is there a possibility to catch the event?
1
vote
3answers
178 views

Get current logged in user and display it on the Site as “Hello (Username)”

I am using SharePoint 2013 Online and I'm looking for some JavaScript and html to display the current logged in user on the site like for example: Hello (Username) If anyone could help or just ...
0
votes
0answers
75 views

Sharepoint 2013 REST API Authentication Problem

I have a Sharepoint 2013 Server and want to read lists in JavaScript using the REST API. I've got it to work in an Application Page just fine but I also want to use this outside of a Sharepoint Site. ...
1
vote
0answers
19 views

Add action on approve button

I want to trigger a custom javascript code when I click on the Approve button on an Approve form (during an Approval workflow). How can I do that?
0
votes
1answer
32 views

Change value when item is approved

I have a MySQL table which contains the name and the quantity of a material. I access it from a Sharepoint page using Javascript and JQUERY Ajax (jsonp). The user adds a request to retrieve a ...
0
votes
0answers
58 views

Workaround for testing to see if a user belongs to Active Directory (AD) group within standard SP Group

I recently implemented a JS/jQuery solution that checks for all of the SP groups to which a user belongs adds the group names classes to the body tag of the pages I am building. It worked very well, ...
2
votes
1answer
39 views

No Javascript, CSS, masterpage loaded in any web application

We've got the following situation. Since today SharePoint central administration and the other 3 web applications are loaded as shown below. No Windows or SharePoint update has been installed since ...
1
vote
1answer
131 views

Get UserId with JavaScript in SharePoint2013 / SharePoint Online

I need to update a person field in a list using a result from a people search (sourceid=B09A7990-05EA-4AF9-81EF-EDFAB16C4E31). The search works great, but does not return the person's ID that I need ...
0
votes
1answer
57 views

Call function new item in a sharepoint 2013 library

I have a list and above this library is a picture button. When I click on this button I would like to call the function which is on "new item". It should appear the form where I can upload the ...
0
votes
0answers
19 views

Custom field as sandbox solution

I am using SharePoint 2013. I need to create a field. The field should work as a Auto complete lookup. The field should look up a given list's column values and suggests the available items as the ...
1
vote
1answer
45 views

Need insight on UpdatePanel / _DoPostBack with JavaScipt

I've spent the better part of three days trying to wrap my head around UpdatePanel and _DoPostBack to find a solution to my problem with my infopath browser enabled form. I have a simple script that ...
1
vote
1answer
34 views

Sharepoint Hosted App Unable To Add Groups

I'm writing a SharePoint hosted app that allows the user to create groups and assign users to them. However, every time I run the code, it gives me a Permission Denied message, saying I don't have the ...
1
vote
0answers
125 views

Image file corrupted upon upload via REST

I have been attempting to use REST to upload image files to SharePoint but am running into the same issue again and again. The issue is that while the image file uploads to an image library, it shows ...
0
votes
2answers
40 views

Allow users to add elements to a list but do not allow them to view it - client side

I have a form which users fill in, and the information is inserted into a Sharepoint List using Javascript. I don't want to allow the users to view the list, but add elements to it using Javascript. ...
0
votes
1answer
60 views

Disable a site collection column inside lists's quick edit grid

I read the following link on how SharePoint 2013 supports disabling a site collection column inside the list's quick edit grid link. so I tried to apply the same inside a custom list. So I wrote the ...
0
votes
0answers
117 views

Losing the selected drop down value when reloading the page - JSLink

I have an EditForm that I am using JSLink to run some javascript that gets the Content Type and then sets the options in a drop down box according to the Content Type. This works fine, but now the ...
0
votes
0answers
58 views

Add SharePoint form fields in content editor web part

I have one Feedback list with columns like category, contact name,contact email, comments and I want to create one feedback form. First of all I need to use Content Editor Web Part only for that with ...
2
votes
1answer
70 views

Sharepoint 2010 get all list items from all lists with javascript

I want to get all list items from all lists in SharePoint 2010 with JavaScript. I always get the error: SCRIPT5022: The collection has not been initialized. It has not been requested or the ...
0
votes
1answer
152 views

accessing and modifying page properties in sharepoint using javascript / CSOM / JSOM / Rest api

I have a custom field "webPartId" in my page property Whenever user clicks save, i want to update the field I am not able to get any code snippets for that! The closest i could reach is finding ...
0
votes
0answers
26 views

Retrieve the values/ text from the Sharepoint Choice list using simple JavaScript

Project Description: I need a JavaScript that can give the selected choices in from one menu in the multi-line text box as a list. let say I have a Menu that have checkbox choices, choices are A,B ...
0
votes
0answers
521 views

implementing fullcalendar with angular js

I am building an event scheduling app by using angular js framework and fullcalendar plugin. I tried to google and implement different ways to make the calendar visible but it's not working. I have ...
2
votes
1answer
65 views

Update readonly field using REST API

I am trying to update a list item using Rest API. Following is my code. It works and it updates all fields except "RichMessage" which is a Note field with RichText="TRUE" and readonly. I have tested ...
1
vote
0answers
28 views

Access ADFS-provided information in CSOM

I have hit a bit of a roadblock in some recent work, and I'm not sure how to proceed. Goal: be able to access a user's first and last name in JavaScript running in a SharePoint 2013 page, through the ...
1
vote
1answer
23 views

ECMA only working in edit mode

I'm sure I'm missing some file but this script work when page is in edit mode but not when it is in display mode? <script type="text/javascript"> ...
0
votes
2answers
34 views

Enable major versioning javascript

How could I enable major versioning on list? My code is not working and I don't get any errors. _spBodyOnLoadFunctionNames.push(onPageLoad()); function onPageLoad() { ...