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

How to distinguish SharePoint 2013/2016 on-premises and SharePoint Online

Our add-in needs to execute different JavaScript code on SharePoint on premises and on SharePoint Online. There is a slight difference, but it is critical for our add-in. The add-in is a pure ...
0
votes
0answers
21 views

Find list element when page is loaded

I'm trying to get an element once page has been loaded. However when I put the code in window.onload = function () { my code }; it's not working, without window.onloadit get's the element. here's my ...
1
vote
1answer
44 views

LinkButton onclick not working after postback

This linkbutton stops working after I do a postback. The JS will still run and will correctly return true/false. The postback that breaks this is exporting a data table to Excel. Note: this code ...
0
votes
1answer
29 views

hide edit button if column1!=draft in a list

I have a list and an edit button associated with each list item. The list contains another column called 'status'. I want to display that edit button if and only if status column value is not equals ...
0
votes
3answers
26 views

Conditional Formatting to apply color to indicate progression towards a numeric target

I'm wondering if anyone can help me with a calculate column/JS Link formula. I have a monthly performance indicator which is a count of the number of inspections I perform. There is a target number ...
0
votes
1answer
44 views

SharePoint Online Custom List

I followed this guide http://www.c-sharpcorner.com/UploadFile/anavijai/angularjs-in-sharepoint-2013-part-1/ on creating an AngularJS with the use of the script editor but when I completed the code and ...
0
votes
1answer
14 views

Get Content Type Name using JavaScript

I have a SharePoint 2013 on premise environment and I am currently using some JavaScript to query a pages library, however once I have queried the pages library I need to do an if statement based on ...
0
votes
0answers
3k 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
1answer
668 views

current user is always is administrator on a SharePoint App

I have tried following solution to check the current user's permissions on the current host web in a SharePoint hosted app, however the user is always administrator. function sharePointReady() { ...
0
votes
0answers
16 views

Clear search without having to refresh the entire page

I've got a publishing page with the web parts: searchbox searchresults search refiners ... When I've done a search I want to clear the search box, search refiners and the search results web part ...
0
votes
1answer
882 views

A script on this page may be busy, or It may have stopped responding

there is one webpart on page that rotate the images so i added a jquery to rotate images and its working fine but after sometime it gives error like A script on this page may be busy, or It may have ...
0
votes
0answers
8 views

Javascript to read tabular data in sharepoint webpage [closed]

Can java / vb script be created that reads the url of SharePoint webpage, loop through the tabular fields of the SharePoint webpage and write the data from field in word file? I would also like to ...
1
vote
0answers
31 views

Updating item in list depending on choice

I have the following code : <div> <input type="radio" id="firstAppointment" name="choose-option" value="1"> <span> Subscription1 </span> </div> <div ...
0
votes
1answer
28 views

Allow a SharePoint document to be displayed in a frame

I have a SharePoint list with attachment, I want to display these attachment in a Frame for preview but I get this error: This content cannot be displayed in a frame To help protect the security of ...
11
votes
5answers
36k views

How to get current user with javascript?

I have a list . I want select items of list with a special quary.(get items that created with current user). Then get count of items. I use this code for get current user : function Initialize() { ...
0
votes
1answer
20 views

Javascript load document libraries dynamically by parameter

So, I have asked several questions on this topic and each one resulted in a bit of progress. I believe I am now on the last step and I am not sure why this javascript doesn't work. The basic goal is ...
0
votes
1answer
19 views

Access Multiple Client Contexts in SharePoint Hosted Add-in

I'm trying to access multiple client contexts (not at the same time) of different lists. Each list is hosted on a separate site collection than the rest, and I need the context in order to access its ...
2
votes
1answer
18 views

Type is undefined: Javascript error that occurs in new environment but not the old

I am building a new VM for Development. In my Production environment I have a page that throws no errors and works correctly. However, when I try to look at this page in the new VM, I get the error "...
0
votes
1answer
60 views

Search Driven Navigation for SharePoint Online

I'm trying to set up search-driven navigation for SharePoint Online on my site collection. I'm following this: https://support.office.com/en-us/article/Navigation-options-for-SharePoint-Online-...
0
votes
1answer
36 views

HTML data to SharePoint list [closed]

I have an aspx page with JS parser which parse JSON to HTML. Can I get parsed information and load it to SharePoint list?
0
votes
1answer
32 views

Unauthorized Error using web api with REST in different site collection the add-in isn't deployed at

I'm trying to write a sharepoint 2013 add-in that reads certain list info from a bunch of site collections i get first and write into an array, however whenever i try to access any sitecollection but ...
0
votes
1answer
2k views

Hover effect over an image in SharePoint 2010

I would like to add a kind of hover effect over an image. My source code in JavaScript looks like the following: _spBodyOnLoadFunctionNames.push("color"); function color(){ var $th = $("div[Name='...
5
votes
2answers
5k views

SharePoint 2013 Add Read more link in Announcement web part each list items

I want to add Read more link in my Announcement Web Part I followed this blog post: http://www.learningsharepoint.com/2013/04/07/styling-announcements-with-javascript-using-js-link-in-sharepoint-2013/ ...
4
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
28 views

Passing a value to a custom JSLink field type

I'm creating a custom field type for Sharepoint using the JSLink method. This field will be used in New List Item / Edit List Item forms. What I want to do is to allow a user to set a custom ...
4
votes
1answer
2k 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 ...
1
vote
2answers
28 views

Create a document library or retrieve documents using JavaScript from static site

I'm confused by all integration options SharePoint offers. My business case is the following: I have a static HTML/CSS/JavaScript site hosted outside of SharePoint (so cross domains is an issue here ...
3
votes
1answer
192 views

why does this code don't work in the content-editor? (MyTasks)

I wrote a JavaScript function where I get my Tasks and Tasks from Team Space. They are supposed to look like: And this works as long as its a own HTML-site. Like tasks.html. When I try to add it to ...
1
vote
1answer
3k views

add multi select dropdown selected values to sharepoint list by Ecmascript

I have a sharepoint list which where I want to insert multi selected values from a dropdown list. <select multiple="multiple"> <option>A</option> <option>B</option>...
0
votes
0answers
22 views

Error in updating batch list item

Here is my code: var clientContext = SP.ClientContext.get_current(); var oList = clientContext.get_web().get_lists().getByTitle('FlexMasterList'); var oListItem; var i=1; var j=0; for(i=1;i<...
1
vote
1answer
21 views

Error updating List Items

I have found this code to perform batch update function updateListItems() { var itemArray = []; var clientContext = SP.ClientContext.get_current(); var oList = clientContext.get_web()....
0
votes
2answers
70 views

SharePoint JSLink override not working

I need to overwrite a multiline sharepoint field by a tooltip but it's not wotking. (function () { var SubjectFiledContext = {}; SubjectFiledContext.Templates = {}; ...
2
votes
2answers
727 views

List Item file attachment using ECMAScript Object Model

How to simply upload & attach file to listItem using Javascript? And how to get/download attachments.
1
vote
1answer
32 views

Error while iterating list

I tried this: var itemArray = []; var clientContext = SP.ClientContext.get_current(); var oList = clientContext.get_web().get_lists().getByTitle('FlexMasterList'); var oListItem; ...
0
votes
2answers
66 views

Using SharePoint 2013 Online, how do I run getSubwebsFilteredForCurrentUser on sibling site collections and display in a single page?

The page containing the results belongs to one of the sibling sites and I would like to be able to loop through the site collections dynamically without providing a list of collections first.
0
votes
1answer
720 views

Sharepoint list to XML including the headings?

We store data regarding Scrum sprint retrospectives in a SharePoint list. I have to create a chart for visualizing this information (which is not part of this topic/problem), so I need to somehow ...
1
vote
2answers
1k views

How to check if a list item exists or not in SharePoint 2013 using javascript

I have created one custom form and insert data into one list.I want to check before data insert into the list if the data exists in list or not .
1
vote
3answers
2k views

SP.ClientContext is not a Constructor

I keep receiving the error message "SP.ClientContext is not a Constructor" every time I try to use it in my JS code. After doing a bit of research online, I found SP.SOD.execute function(). However, I ...
0
votes
0answers
19 views

Display Google Analytics using API on Sharepoint Site

I'm wanting to display Google Analytics on my Sharepoint site, which acts as an internal intranet. THIS POST HERE seems to have a solution but I don't quite get it - I'm hoping for a dummies guide ...
0
votes
1answer
23 views

how to prevent duplicate values for people and group column sharepoint 2010

I've column in a list where we are adding the user name(column type = user and group). If the user is already added in the list and same user if I want to save I should get error message user already ...
0
votes
1answer
21 views

Disable Item Created By Permissions in SP2007?

I have been editing the editform.aspx for a list I manage. I used some jquery and javascript in order to hide certain fields. However there comes a point in my workflow where I need to disable the ...
0
votes
0answers
24 views

how to merge two items in a single list

In SharePoint 2010 List how to merge two item id in new item while clicking on button using JAVASCRIPT/JQUERY/SPSERVICES. For example I've List1 in this two item inserted. Now once I'll select both ...
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 ...
3
votes
4answers
941 views

Getting Value of Radio Button on SharePoint 2013 Edit Form using jQuery

EDIT: updated verbiage to reflect this is specifically a Radio Button choice field. The below script works when the choice is set to display in a drop down. I'd like to be able to do the equivalent ...
0
votes
0answers
17 views

Can SharePoint 2016 crawler index JavaScript driven pages?

We have pages that are heavily driven by JavaScript and need to get them into the search results. Is this be possible?
0
votes
1answer
14 views

How to import table in excel to infopath form?

I have created the form template in excel. now I want to replicate the same in InfoPath.like I have created a table in excel and I want the table to import in InfoPath form. How to import selected ...
14
votes
8answers
45k 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 ...
0
votes
1answer
637 views

How to get Web Application url in SharePoint 2013 in Javascript? [duplicate]

I'm looking for a "beautiful" and the fastest way to get only the web application url (don't want to trim or substring or anything else).
1
vote
0answers
19 views

All methods to add JavaScript to SharePoint 2010 - Online

I am working on documentation of all methods of adding JavaScript to a page I have some blanks I can not test easily, does anyone know the answers? When Office365 is configured to NOT allow Custom ...
0
votes
1answer
20 views

Site Assets Javascript file will not update

So I have the weirdest problem I have seen in SharePoint yet. So I am trying to practice using javascript and I can't figure out what is wrong with my methodology. For a background, I am trying to ...