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
3answers
27 views

How to get appWebUrl and hostUrl when getQueryStringParameter fails?

I have a sharepoint app with multiple .aspx pages. On different pages I push and pull from sharepoint lists and I would like to send emails. These require me knowing hostUrl and appWebUrl. I would ...
0
votes
0answers
12 views

Change selected items order and merge using Javascript

I am now able to get the selected list items and merge its contents. Is there a way to reorder the selected items before merge? Or is there a way to get the items in the order in which they are ...
0
votes
1answer
21 views

retrieve choice value with jsom

I'm trying to retieve a choice value that a suer has selected from a dropdown list with : var oTextColour=oListItem.get_item('myChoice'); But I get null when alerting the value. I've tried : var ...
1
vote
2answers
13 views

how to email data from edit from of sharepoint calender list

I have a sharepoint list with 3 columns. User edits the item and updates a column. CLicks on custom button present on the ribbon for send email. The email body should contain the value of 3 columns ...
0
votes
1answer
21 views

Can I disable MDS on a single web part page

I have a custom list on a custom web part page with scripts that affect color coding as well as clickable attachment icons. These scripts do not execute when the list is grouped, and the groups are ...
0
votes
3answers
31 views

How to update Created By Author field in list SharePoint 2013 JavaScript Client Object Model

Just wanting to know how to update a user field, like CreatedBy or Author based on a users name e.g. steven.martin? I seem to have it working fine, from a user id, but not from a user name. get user ...
0
votes
1answer
17 views

Full Example Of JSRequest In SharePoint 2010

I am trying to get JSRequest.QueryString working. I have seen numerous examples like the following: //First we must call the EnsureSetup method JSRequest.EnsureSetup(); //Get a query string ...
0
votes
1answer
40 views

How to authenticate user in SharePoint Online using rest api

I have a website on SharePoint Online and a website on SharePoint On-premise. From my On-premise website i want to create a new list on my SharePoint Online site. To authenticate I used the ...
0
votes
1answer
11 views

email data from edit from of sharepoint calender list

I have 1 calender list. In the edit form of items in the list, i have added a custom button in the ribbon which is responsible to read the data from the edit form and email it to a person. I am not ...
0
votes
1answer
24 views

how to get Relative Url using Jquery in Sharepoint Site?

in my sharepoint site first i want to get Host URL(/Site URL ),and user enter Relative URL in TextBox then i want to append that relative url with Host Url Using JQuery and nedd to check that url ...
0
votes
0answers
21 views

SharePoint 2013: JavaSript Object Model - Inserting 'Reusable Content' programmatically not working

Goal: I am trying to click a button on a page that sets the 'PublishingPageContent' field on another page with data from a 'Reusable Content' list item. Problem: Whenever I go to the updated page ...
0
votes
1answer
25 views

Is it possible to write a CAML query that will update or insert an entry based on its existence?

I'm working with Sharepoint using CSOM and Javascript. I need to cache usage statistics in a List with one entry per user, updating values in a user's list entry when they interact with the site in a ...
0
votes
1answer
27 views

SharePoint 2013: JavaScript Object Model - Caml Query where list item is selected

How could I use a caml query to only get the list items that are selected using the JavaScript Object Model? <Where> <Eq> <FieldRef Name= ??? /> <Value ...
0
votes
2answers
34 views

Get the title of the item in detailed view (JavaScript)

When I click on an item in a list I get to the detailed view. There I need the title of this item. I could find it in the title of the page (when you look on the tab of your browser) but I think it's ...
0
votes
1answer
25 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 ...
0
votes
1answer
15 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
1answer
35 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
37 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
57 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
2answers
46 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
39 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 ...
4
votes
6answers
193 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
31 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
56 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
48 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 ...
0
votes
1answer
32 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
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
31 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 ...
0
votes
1answer
25 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 ...
3
votes
1answer
51 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
0answers
19 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 = ...
1
vote
0answers
28 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
0answers
24 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 ...
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 ...
0
votes
1answer
31 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 ...
0
votes
0answers
27 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 ...
3
votes
1answer
76 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
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 ...
1
vote
0answers
17 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 ...
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
0answers
3 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
15 views

Validate unique value for the list item via JavaScript Object Model

Could you please help me with implementing following logic: I need to check new uploading document name with existing documents. If dublicate or simular document exists, it shoud show existing names ...
4
votes
2answers
93 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 ...
0
votes
2answers
36 views

How to access list of website users from SharePoint hosted app?

My app is hosted here: https://mySite.sharepoint.com/sites/path/myApp/ And user information is hosted here: https://mySite.sharepoint.com/sites/path/_catalogs/users/simple.aspx I already use this ...
0
votes
3answers
41 views

Get current user using Javascript in New Item form

I have Sharepoint 2010 with a IT Help Desk type site. I'm trying to get the current user auto-populated into a people picker field (Business Owner). I've been googling and trying to nut this out but ...
0
votes
1answer
29 views

Default View edit column order with Javascript

I have a List which is generated and populated with Javascript. However after that I remove a column and add column 'Id' to the default view with the following code: function ...
1
vote
1answer
40 views

ASCX controls, how to prevent multiple inclusions of same Javascript file?

By example we have two webparts on page, with ascx controls. One ASCX control loads this.Controls.Add(new ScriptLink() { Name = ...
1
vote
1answer
41 views

Is there a way to log specific clicks?

I need to log when users click on specific links on our SharePoint site. Something like: bob@company.com - Clicked Special Link #1 - 02/13/2015 14:41 joe@company.com - Clicked Special Link #7 ...
0
votes
1answer
34 views

Create docx file in document library using JSOM

I have written a script which creates a new txt file into the document library using Javascript. When I change the file extension to docx, it still creates but I'm unable to view the file.. It gives ...
1
vote
2answers
33 views

How to get web part id

This is a follow up question to the one i asked earlier : Reading web part properties using javascript object model In my earlier question I had been able to access the properties using jsom but i am ...