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
0answers
12 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
3answers
39 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
2k views

Add new item to child list and refresh the parent form - multiple lookup

I've created a parent list (Vendors) and a child list (software list). There can be multiple vendors for one piece of software. I've created a custom new form with a link which opens up a modal to add ...
1
vote
4answers
539 views

Get List by “InternalName”

I'm trying to use the SharePoint 2013 JavaScript Object Model to retrieve a List via an internal name equivalent. SPList doesn't have a Name or Internal Name property. It is referred to by the ...
0
votes
2answers
25 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
122 views

retrieving custom list javascript

This is my first attempt at this software and I'm having problems pulling data from a custom list I've created in sharePoint. Here's what I have <script> var items; ...
1
vote
2answers
905 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' ...
0
votes
1answer
469 views

SharePoint 2013 custom Attach File button

I'm trying to create a custom "Attach File" button in my SharePoint 2013 New Item form. So far this is what I've done: HTML <div onclick="javascript:openpageindialog();" class="btn" ...
0
votes
1answer
1k views

Upload a document in a specific folder

I would like to set a specific folder when I open the upload.aspx page to help. I tryed to look in the dll but the license of reflector is expired. UPDATED Maybe this post can help ...
3
votes
3answers
2k views

How can I implement SharePoint JSGrid filtering and grouping functionality?

I am working on SharePoint JSGrid. I am able to implement the sort functionality in JSGrid. Now I want to implement the grouping and filtering in my custom JSGrid. For filtering we have to attached ...
2
votes
1answer
58 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 ...
1
vote
1answer
611 views

Custom .aspx as modal dialog not working: 'SP' is undefined

SharePoint 2013 server... I have created a custom aspx page for use as a modal dialog. I want this pop up to collect field values and return them to the form the pop up was called from. The pop up ...
0
votes
1answer
19 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
20 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 ...
3
votes
1answer
3k views

Getting Version History and What Field has Changed

I am using the GetVersionCollection to get the history information from my list. This seems to be working fine; however, what I need to do is get the version history of the individual item which has ...
1
vote
1answer
29 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
31 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
58 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
89 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 ...
1
vote
1answer
27 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?
0
votes
1answer
27 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
2answers
29 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 ...
0
votes
0answers
21 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.
8
votes
5answers
4k views

How do I trigger the default form validation without submitting the form

I'm customizing the NewForm of a list item and need to trigger the default form validation from my JavaScript, but I don't want the form to be submitted, since I'm doing that in a callback later on. ...
1
vote
3answers
65 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
38 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. ...
0
votes
1answer
32 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 ...
1
vote
0answers
14 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
0answers
26 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
33 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 ...
0
votes
1answer
31 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
1answer
46 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 ...
1
vote
0answers
21 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 ...
2
votes
1answer
41 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
1answer
77 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
3answers
75 views

Where is MicrosoftAjax.js located/did something just change in SharePoint Online?

I am using SharePoint Online and was referencing the MicrosoftAjax.js file via /_layouts/MicrosoftAjax.js for the past several weeks without issue. A week later and no changes to the system and it is ...
1
vote
1answer
23 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 ...
0
votes
0answers
95 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 ...
0
votes
0answers
10 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 ...
0
votes
0answers
9 views

Javascript fails after data query Infopath Browser Enabled form

I generally use JavaScript in a CEWP to manipulate objects in my InfoPath browser enabled forms in SharePoint 2010 with a bit of success, however, I've run into an issue using JavaScript in my forms ...
1
vote
0answers
33 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 ...
1
vote
4answers
2k views

“Injecting” status icons in SharePoint list

I have a list that have a date column called 'Expired' and must somehow represent the status as an icon (example in image) The solution must be deployable on farm level since the expires column may ...
0
votes
2answers
27 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
0answers
63 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 ...
1
vote
1answer
472 views

how to find out when a user last visited?

I'm trying to figure out when a user has last visited.So let's say I logged out of my SharePoint intranet last night at 11PM, and this morning I logged back in at 9AM, I'd like to see a message saying ...
1
vote
1answer
510 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
0
votes
0answers
37 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 ...
0
votes
2answers
32 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() { ...
1
vote
4answers
71 views

Best practice to minimize/compress/bundle css and js files in VS SharePoint solutions?

We are using a large VS 2012 SharePoint solution. We are using many css and js files. We would like to increase the performance. What is the best practice to minimize/compress/bundle css and js files ...
0
votes
0answers
13 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 ...