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

Retrieve list value with more than 2 look up field

I have a list 'NewsList' with columns Title, ShortDescription,Image ,Programs,Division and Tag. Here, Programs,Division and Tag are lookup fields with same list name. When I try to retrieve the ...
3
votes
3answers
1k views

Get UI language name in javascript

I need to get the name of the current UI language in a javascript file. I know the following trick: SP.Res.lcid But that gets the the LCID. What I really need is the two-letter iso name (like 'en', ...
0
votes
0answers
7 views

Project Server Get project field value using Javascript

I've been using javascript to access to libraries in a site, but now I want to get the value of a custom field in a project. I've been looking to do this but I've found nothing, clientcontext does ...
0
votes
0answers
28 views

The choice SELECT doesn't work, only 1 value boots, and there is a lot of them, help with a code

$().SPServices({ operation: "GetListItems", async: false, listName: "Telekom Group", CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Name' ...
2
votes
1answer
32 views

SharePoint 2013: JavaScript Object Model - Create an enterprise wiki page

I have spent a couple of days trying to fix this problem. Goal: - Click a button on an existing page that creates an enterprise wiki page in the pages library and adopts the default custom layout. ...
0
votes
1answer
64 views

query calender list so user cant book same date and time

Update var context= SP.ClientContext.get_current(); var web = context.get_web(); var list = web.get_lists(); var targetList; function createItem() { targetList = ...
0
votes
1answer
34 views

How to consolidate JS for CAML queries with multiple filters?

I'm very new at the entire JS/SPServices concept (and JS as a whole) and I'm trying to slim down the amount of JS needed for a few HTML pages. I have several unordered lists on the HTML page that I ...
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 ...
1
vote
1answer
1k views

Use existing Modal Popup

I was wondering is there is a way to use the existing modal popup already used by SharePoint and override its callback? Thanks.
0
votes
2answers
41 views

Automatically copy items

We have 6 different libraries. All of them are working with a checkbox column (management). Is it possible to run a script or something like that, which grabs all documents (management = yes) and copy ...
1
vote
1answer
37 views

SP2013: JavaScript Object Model - Setting the value of a list field

How do I set the value of a field in a list using the JavaScript object model? I am trying to click a button on an existing page that automatically creates a new wikipage (which I have done) and ...
2
votes
2answers
1k views

Using JavaScript file in Elements.xml

I am trying to create a custom ribbon and in my project I have created a JavaScript file. From this and this question I was able to figure out that I can use <CustomAction> tag to import the ...
3
votes
6answers
150 views

Get a SharePoint ListItem ID from a List where the 'Title' field is a specific value in JavaScript

I am trying to extract the ListItem ID of a List which I am currently NOT in based on a field value in that List. I cant find anything that explains how to do this. So, to explain. I have a Custom ...
3
votes
1answer
27 views

Optimizing taxonomyTerm request

I'm working on a custom navigation webpart for SP2013 using the JSOM. Currently, a part of fetching the data from the termstore involves fetching all the terms and then getting data from the ...
0
votes
1answer
47 views

client side IDs of share point elements

I need to hide some menu items that come OOTB on sharepoint pages. I can do this through javascript/jquery, but am not sure how consistent are the client side IDs of various elements on SP pages. I ...
10
votes
5answers
3k views

How can I disable the Document Library drag and drop function?

Before I start - I'm new to this SharePoint development lark and am slowly familiarising myself with it. We're using SharePoint online and I have amended the SharePoint out-of-the-box document ...
0
votes
1answer
24 views

Calendar View to Hide 12:00 AM

Dealing with SharePoint 2007 Calendar view. We are trying some javascript via a content editor to hide the "12:00 AM" when viewing the data from a calendar view. It's only hiding the first ...
0
votes
3answers
517 views

SP2013 online : set_formDigestHandlingEnabled Error

I get the error : Object doesn't support property or method 'set_formDigestHandlingEnabled' when I try to get the current SPContext object from javascript code in an Office 365 site. I am ...
0
votes
1answer
54 views

O365 Patterns and Practices JavaScript Injection / Embed JavaScript

I have a vanilla O365 developer site which I'm deploying the app in the JavaScriptInjection example here - ...
0
votes
1answer
29 views

Reset sharepoint lookup with None option using jquery

How to reset the lookup value to None in Editform.aspx page using Jquery. I want to empty the lookup dropdown if text box does not have any value . Here is the code which i have tried.I was able to ...
0
votes
1answer
30 views

Javascript to display defaulteditform in modal dialogue used by sharepoint

Does anyone have the javascript required to display the defaulteditform in the modal dialogue that SharePoint (v2010) displays an edit form in ? I'd like to add this to my html ?
4
votes
4answers
2k views

SharePoint REST API call with more than 500 rows

I have an AJAX call querying the SharePoint REST API which will return more than 500 rows: $.ajax( { url: _spPageContextInfo.webAbsoluteUrl + ...
0
votes
1answer
347 views

How can I attach a file from SharePoint document library to an item in a SharePoint list (javascript)?

In my current project I have encountered an interesting problem. I am trying to attach multiple files (pdf's, doc's etc. not only text files) to my SharePoint List, getting them from a document ...
2
votes
1answer
826 views

How to open file in adobe reader using command line without checkout from Javascript?

I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
2
votes
1answer
50 views

Error while closing Modal Dialog (JavaScript)

So I create a Modal Dialog with this code: function openModalDialog(title, url, callback) { var options = { title: title, url: url, dialogReturnValueCallback: callback ...
1
vote
3answers
275 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
1answer
477 views

Grabbing a filter value via CEWP code behind

I have employed a Query String Filter to parse a value and send it to a chart web part. now I would like to use this value in a CEWP to provide an explaination/clarification for the chart, but the ...
0
votes
2answers
38 views

Accordion in Sharepoint

I have to create a horizontal accordion with autoplay functionality. I found a code on the "http://www.designchemical.com/blog/index.php/jquery/jquery-simple-horizontal-accordion/" It does not ...
0
votes
1answer
29 views

JSOM request limitations

I'm building a custom navigation for SP2013 that uses termstore to manage the menu items reasonably. This technet article covers basic termstore limitations, but it doesn't touch on the following ...
3
votes
1answer
48 views

Retrieve subsites from site collection sort last modified date using CSOM

I want to retrieve subsites from current site collection. And it should be order by last item modified date. I am able to retrieve subsites by following code : channel_context = ...
1
vote
1answer
475 views

Column not found when creating list item with Javascript

I am making a SharePoint app with javascript. I am trying to add a list item to a list I have defined in Visual Studio. I have done this just by adding a list in the solution explorer, and I made ...
1
vote
0answers
18 views

Call Javascript Function After Saving Calendar Item

I am having a script as below:- function getColorValue(aId,atitle) { try{ var clientContext = new SP.ClientContext(); var oWebsite = clientContext.get_web(); var oList = ...
3
votes
2answers
85 views

Reliably get attachments for list item

I'm working with SP2010's SP.js and I need to get all the attachments of a list item. As it's SP2010, I don't have access to SP.ListItem's attachmentFiles property. :( The following code works for ...
8
votes
5answers
21k views

Get Site Collection full URL using javascript

I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way. I know that you can use ECMA script and the client ...
1
vote
0answers
27 views

Pre-selected Refiners

I have a Search Center set up with a number of refiners. One of the refiners for the items returned identifies whether a document is considered archived or not. It is required that a user can search ...
1
vote
2answers
31 views

How can I see the fields available for retrieval via get_item()?

I'm using Javascript CSOM to try and integrate a Discussion list into a site I'm working on. However, I can't figure out what Discussion item fields are available for me to access via get_item(). I ...
1
vote
0answers
22 views

Options for caching client-side requests?

Does Sharepoint 2013 offer any options for caching certain client-side requests for different clients (like ASP.NET cache)? I'm already using localStorage, but that only caches data for a single ...
0
votes
1answer
29 views

Fill textfield with JavaScript

I have a textfield which needs to get the value of a variable. When I select the <input> by it's ID, and use jQuery.val(variable) I get [] as output (Chrome Developer Tools). When I use ...
2
votes
1answer
1k views

_spPageContextInfo is undefined in client web part

I have created a client web part for a SharePoint-hosted app that I am creating. The app makes use of the clienttemplates.js library in SharePoint to render user presence (Lync) in the web page. I am ...
0
votes
0answers
18 views

Web Part Chrome State To Minimized On Page Load

I need all web parts on page to be in minimized state on page load using CEWP/SP Designer/Code behind. I tried a lot. One more doubt I need to clarify from experts over here, when I set chrome state ...
0
votes
1answer
99 views

How to get the value of the PeopleEditor in SharePoint 2013

I need to get the value of the PeopleEditor using JavaScript and jQuery. following this article : ...
3
votes
1answer
71 views

Wait for _spPageContextInfo to initialize

What is the fastest way to wait/check for _spPageContextInfo to be initialized? I use AdditionalPageHead so my scripts are loaded before _spPageContextInfo is set. Here are some alternatives, some I ...
0
votes
0answers
26 views

Copy File site collection to subsite with REST API & Javascript

Im trying to copy a file from between sites. Everything works out fine, but when I try to open the copy I get an error messages that tells me the document is corrupted. Ive been trying the approach ...
2
votes
1answer
604 views

Get selected items from JavaScript in the document library view

I have a page in which I have placed XsltListView web part to show the view of the picture library. Above that view I have placed a link using Content Editor Web Part which redirects to other web ...
0
votes
1answer
442 views

loading multiple files from custom action with SP.ClientContext

I made a custom action that calls GetSelectedListItemAsString(). it should load the files 1 by 1 but somehow it does not load the files can somebody help me with it underneat a code snippet of the ...
1
vote
0answers
16 views

How to execute a SQL Agent Job on a button click in a Web Part page of a SharePoint 2013 site?

I have a SharePoint 2013 on-premises site. The requirement is to add a button to one of the Webpart pages and on click of that button, a sequence of 3 consecutive SQL Server Agent jobs will be ...
3
votes
2answers
195 views

launch ribbon action with ribbon hidden

I didn't find anything to help me out, so I'm asking your help. I work with sharepoint 2010. I have a team Site where the ribbon is hidden. (never trust users, thay are evil :p ) On this team site I ...
2
votes
3answers
34 views

How to correctly load SP JS resources in a code snippet

I have inserted the following javascript into a masterpage, however I am getting this error: Uncaught TypeError: undefined is not a function I believe that this might be because the SP JS files ...
0
votes
2answers
68 views

Get user from sharepoint group and redirect

My requirement is when someone login to site and if he belong to 'owner' group it need to redirect immediately to specific site and if he belong to member group then need to navigate/redirect to same ...
2
votes
0answers
50 views

Get object of ribbon button in JavaScript

I am trying to access the ribbon button via JavaScript. Below is my code: // Get the page manager var ribbonPageMgr = SP.Ribbon.PageManager.get_instance(); // Get the ribbon var ribbon = ...