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

Uncaught Error: The property or field has not been initialized

I am trying to run the following code in a simple sharepoint app, but I got this error: Uncaught Error: The property or field has not been initialized. It has not been requested or the request has ...
0
votes
0answers
98 views

ECMAScript is not working in SharePoint 2013 content editor webpart

ECMAScript is not working in SharePoint 2013 content editor web-part.Please let me know issue in the below code. <script src="http://code.jquery.com/jquery-1.9.1.js" ...
0
votes
2answers
166 views

Failed to load resource: the server responded with a status of 406 (Not Acceptable) when my REST api call

Failed to load resource: the server responded with a status of 406 (Not Acceptable) when my REST api call works in site. But when I enter the REST url in browser it returns the result. So nothing ...
0
votes
1answer
37 views

How do I get the url pointing to a document library?

I am trying to retrieve all document libraries in a site collection using an SP.Service and place them in a container with their correspondent url pointing to the internal library. So far I have ...
0
votes
1answer
30 views

Ecmascript to read specific custom properties of library and based on the property value delete the item

ECMAScript to read specific custom properties of library and based on the property value delete the item. var itemId = 43; function filldata() { var clientContext = ...
1
vote
1answer
56 views

Is there an “onLoad” equivalent for ajax web parts?

I need to run some jQuery (some formatting clean-up) against the output of an OOTB list which is loaded and refreshed with ajax. The problem is that the list doesn't render until well after jQuery's ...
1
vote
3answers
144 views

Days Past Since List Item Created - SharePoint Online 2013

I would like to make a column that shows how old a list item is. Since the calculated value [Today] isn't supported I need to come up with another way to subtract date created with the current date. ...
0
votes
0answers
41 views

How to set default sharepoint:formfield value without using javascript

Trying to customise a list form. Is it possible to initialise the "ObjectName" field to a value passed in the query string without using javascript? Thanks.
3
votes
1answer
148 views

How do you properly write to a managed metadata column from JSOM? (SharePoint 2013)

I am trying to write the value of a managed metadata column across several documents in a document library at once using JSOM, but for some reason the way I'm trying only writes the value to the first ...
2
votes
1answer
92 views

Add custom action to sharepoint ribbon button

In my SharePoint view have export excel ribbon, this is ribbon of SP standard. When click to this ribbon, I want to prompt a confirm dialog with javascript before export. If user click OK on this ...
0
votes
1answer
39 views

Changing a custom content type's icon, possibly with javascript

I have a document library with multiple cusotom content types derived from "Document Set". They all show up with the same icon in a general list view. Here's what I would like to do: I'd like to ...
0
votes
1answer
46 views

Script Enter key do the same thing as Search Button

I have a search box which filter Data from Sharepoint list developped with Javascript, here is the code : <script type="text/javascript"> function RedirectUrl(){var tb = ...
0
votes
2answers
53 views

JS ClientContext return undefine when deleteObject

I'm trying to delete a list item from a SharePoint library via JavaScript with ClientContext. Unfortunately I don't have access to the ID of the item that's why I use the Title and I can not delete ...
1
vote
3answers
121 views

What is the correct way to reference javascript in Sharepoint 2013?

I have found conflicting sources on linking/referencing JavaScript to a SharePoint .HTML Masterpage in SP2013. Out of the box, SP2013 instructions from Design Manager interface are to Use this ...
1
vote
1answer
68 views

How To “Add New Item” On Quick Launch & Refresh Page

On a SharePoint 2010 site how can I create an "Add New Item" link to the quick launch that will refresh the parent page when the new item is submitted? I have used the following snippet to create the ...
2
votes
1answer
27 views

How can you share script members between control template and item template

I'm developing two custom display templates (Control and Item template) and I'm wondering if it is possible to share script members between these two templates, e.g. if I add something like var bar = ...
1
vote
0answers
23 views

Create folder inside site assets

How can i create a folder inside site assets from a app? Here is my code, it says that folder item is undefined. var hostUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl")); var ...
1
vote
1answer
37 views

how can I http POST to libraries with SP 2010's REST API?

SP 2010's REST api documentation cites an example that uses a list, whereas I wish to rely on a library (for example, "SharedDocuments"), because a standard named library already exists in every ...
1
vote
2answers
259 views

How to pass parameter from modal popup to parent window

I have a parent window which is a Display page of a list item. This page comes as a result of some redirection with custom querystring parameters to it. one of the querystring parameter is ...
0
votes
1answer
30 views

client context with userproperties and a list

I am trying to use a client context and load in userproperties and a list in the same success method. However I am having a problem as I get an error saying my listitems are undefined. Here is my code ...
0
votes
0answers
146 views

Bind Custom List to Gridview using javascript in sharepoint designer

This is my javascript code to bind <script type="text/javascript"> function BindGridView() { $.ajax({ type: "POST", url: "AllItems.aspx/PPB", data: "{}", contentType: ...
1
vote
1answer
39 views

SharePoint 2013 Custom Ribbon Action inside Custom Group

I am trying to make a Custom Ribbon Action within Visual Studio. This works perfectly fine but I would like the Custom Action to reside in a custom group. I've seen lots of helpful(ish) threads/videos ...
0
votes
1answer
27 views

access the contents of a sharepoint list and update it

My problem is how to access the contents of a sharepoint list and update the contents by a button "Save" of another list that it have the same field. I'm working in sharepoint online using ...
0
votes
2answers
38 views

Table of Contents not Displaying

I am trying to create a Table of Contents on my SharePoint page and I was successful in css but it is enclosed in a content editor and after I add it it looks fine but doesn't add the links so that I ...
2
votes
3answers
272 views

sharepoint 2010 javascript get items from a document library

I am trying to use JavaScript to get all the items in a document library. I am able to get it to work, but for the life of me I cannot get the title, name or path to the file to come back. I can get ...
0
votes
0answers
98 views

How to make Exporting highcharts works (to image or pdf) when its inside a PageViewer WebPart / SharePoint 2010?

I've been using SharePoint 2010 PageViewer web part to make available a site for the end users (Asp.Net MVC solution). Accessing my site throughout its url the Exporting highcharts feature works, but ...
0
votes
1answer
106 views

How to get list id and item id?

I want to share document in page which does not have document library web part (hence I can't get renderCtx). I need to use this function: ...
0
votes
1answer
24 views

extract data from a textarea of list and put it into another textarea

When I want to extract data from a textarea of list and put it into another textarea , I have the problem of div. it look like this when my information appears I want to remove the start (div) and ...
1
vote
1answer
55 views

SharePoint 2013 Online Search Query for Site Collections

I wonder if It's possible to get all my site collection names or paths in Javascript, Visual Studios. I've found them through REST when I put server/_api/search/query?querytext='sharepoint' in the ...
0
votes
2answers
46 views

SP13: Master Page Centering

I am working changing the master page to center the content in the middle of the page. For an example, see the homepage to www.topsharepoint.com. To accomplish this task I have changed the master ...
0
votes
3answers
45 views

extracting data from list to form

I made a custom list and in the other side I made a apps, in fact it is a form that I have done with html + css + JS using visual studio and deploying my solution in sharepoint online. my question is ...
0
votes
1answer
68 views

Based on URL how to set Global navigation nodes (CSOM) node as active - javascript

I want to use the same navigation everywhere (mysite, teamsites ..) So I'm fetching the (managed navigation) global navigation by csom in the masterpage. The global navigation is only going to show ...
3
votes
2answers
129 views

What are the advantages of using SP Services?

What advantages would I gain by using the SP Services library in SharePoint releases 2010 and later? The 2013 (and even the 2010) JavaScript Object Model and REST API seem to cover a significant ...
0
votes
1answer
30 views

fill a field of form from custom list

I want to fill the fields of a form, that I builded by an app in visual studio using JavaScript, from another custom list. my problem is in this code and how to do this with JavaScript. function ...
0
votes
1answer
202 views

SPServices GetListItems GroupBy

I am using the SPService, the method GetListItems. I need to groupBy the result (distinct). This is my code: var CamlQuery = '<Query><GroupBy Collapse="TRUE"><FieldRef Name="nameA" ...
1
vote
2answers
273 views

How to handle multiple calls to executeQueryAsync synchronously?

I have a custom list to which I am applying JSLink to NewForm.aspx. The list where JSLink is applied is : XXX and in the JSLink I am querying data to YYY from the list YYY there are two fields ...
0
votes
0answers
20 views

Requete CamlQuery

My question is to check if my CAML query query is good or not. I want to get items from a list by the email of the current user.
0
votes
2answers
131 views

Sharepoint 2013 - Javascript Code for File Upload - Max limit exceeded ?

I have an issue with uploading file > 2MB. I have used javascript code to upload files from my UI. In Central Admin, the allowed file size has been increased to 10MB. Whenever I try to upload a file ...
0
votes
1answer
27 views

Get the title and/or link of the parent website in javascript in SP2013

Is it possible somehow in JavaScript to acquire the title and/or link of the parent of my current site? I know that I can create a client context with a specific URL, but is it possible to do this ...
5
votes
3answers
250 views

Updating a single list item based on relative URL

Is it possible, using SPServices, to update a specific list item when all I have is the file path? For example, I have a file located at /site/library/folder/file.txt and I want to update a single ...
0
votes
0answers
25 views

Is it possible to break alerts in one site collection with client-side scripting?

We have a single site collection where alerts have been down for some time. After review, it was suggested that client-side Javascript (common ones like EasyTabs and SPServices) could break alerts. ...
1
vote
1answer
479 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
1answer
72 views

Remove all user groups from a web site in javascript

I have figured out how to break inheritance on a site, but I really want to do that and then remove all the standard and/or inherited user groups from the site. Is there a way to iterate through all ...
0
votes
1answer
203 views

request failed unexpected response data from server null

My objective is to read and extract data from list created in SharePoint site and put it in another list of the same site. Firstly my problem is that an error message appears where I deploy my ...
0
votes
1answer
165 views

Refreshing a Web Part Without a Post back in SharePoint 2013

I have a list with many columns in SharePoint 2013, I used SharePoint designer 2013 for displaying items , I have tow web parts in a page that I created in SharePoint designer 2013, one web part ...
1
vote
2answers
80 views

jQuery not working properly

In the editform.aspx of an item, I am trying to use jQuery to cause a pop up to go off anytime a field is changed (sort of silly, but once I get this to work, I plan on moving to doing more). However, ...
2
votes
0answers
28 views

SP2013: Tabular view incompatible with JSLink checkboxes?

I'm using a JSLink file to replace a "Single line of text" column with a custom checkbox. For some reason, when "Allow individual item checkboxes" is enabled my checkbox won't work - I can't even ...
0
votes
0answers
24 views

Adding central site column to a list with JavaScript in SP 2013

I'm managing a site where several users (owners) can set up new websites. But there are some areas that they always have to change that I cannot apply to the template. So I programmed a small code ...
0
votes
0answers
284 views

Clientpeoplepicker control in custom SharePoint List form

I use SharePoint 2013. I need advice to bind clientpeoplepicker control with a field. By default, user field on list form is displayed same as SharePoint:ClientPeoplePicker. So we have autocomplete ...
1
vote
2answers
139 views

Access an item in a list in a subsite with Javascript(Solved)

function Testing() { var context = new SP.ClientContext('/Testing'); documents = context.get_web().get_lists().getByTitle("Site Assets").getItems(); context.load(documents); ...