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

Content of Content Editor webpart received by REST call? Is that possible?

I may have various GUIDs and paths/files in hand, but still not able to find the inner content of webpart editor via REST call. I have 1) page name and path, where Content Editor webpart is placed 2) ...
0
votes
2answers
38 views

monotools and sharepoint 2013 conflict

There is a conflict between SharePoint and monotools.js . SharePoint tries to use the method: Type.registerNamespace and monotools.js register a function with the name Type as well. If you call the ...
1
vote
2answers
165 views

Add JQuery to SharePoint

I want to add some global JavaScript to Sharepoint 2010. So I put JQuery to C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\LAYOUTS and my script to C:\Program Files\...
0
votes
1answer
55 views

Open attachments in new tab issue

I am trying to open list item attachments in a new tab (when user clicks on an attachment in display form) I am using this piece of jQuery/javascript in my custom display form to do that: $(document)...
0
votes
2answers
35 views

Show column depending on dropdown selection - not working

Depending on dropdown column selection,. I need one of 5 columns to show and hide the others, however the code does not seem to work, what am I doing wrong? I know I'm missing something. // Execute ...
0
votes
1answer
35 views

How to have number of chosen Lookup field in another list?

I am working on SharePoint 2013 Enterprise. I am looking for a functionality so I can sum item chosen in a list. As an example I have a list call Bus which is the parent list. The second list is the ...
0
votes
1answer
61 views

Pull Data from SharePoint List using JS and converting it into HTML in the following format?

I was wondering how to use JS in order to pull Data from a SP2013 list convert it into HTML using the following structure below. For example: The List fields are as follows: Title Date Image Body ...
0
votes
1answer
46 views

deleteObject undefined error

I'm getting this error when i'm trying to execute delete code SCRIPT5007: Unable to get property 'deleteObject' of undefined or null reference Here is my code...Not sure what is going wrong here....
0
votes
1answer
25 views

SharePoint 2010: Add GroupBy to existing list view using JSOM?

Is it possible to modify an existing view, more specific adding GroupBy, using JavaScript / JSOM? I am creating the library using JavaScript and I'd like to add a GroupBy in the "all items" default ...
3
votes
1answer
46 views

Is there a way to only load javascript based on the authenticated or anonymous user?

We have several page layouts that are calling a javascript file and we are trying to improve our page speeds and we figured we only need to call this js file if the user is logged in. Otherwise for ...
0
votes
1answer
18 views

Looping through CQWP li's

I have a CQWP that executes the following JS: var projectstartdt = $(".hiddenProjectStartDate").html().split(/\-|\s/); var ProjectStart = new Date(projectstartdt.slice(0,3).join('/')+' '+...
0
votes
1answer
27 views

Java Script With Sharepoint Designer 2013

How can I Implement the following : I Created Custom Edit Form for my custom List with tow field ( title , checkedIn ), when you click save button i want to show alert message (yes/No) , if You choose ...
0
votes
1answer
24 views

Javascript help with retrieving data from list SP2010

I would like to retrieve data from a list that has 2 columns but 4 fields. Ex. I need the calculation from monthly & yearly cost from group 1 and calculations for monthly cost & yearly cost ...
0
votes
1answer
65 views

How to check page layout from javascript of current page in sharepoint 2013?

Does anyone know how to check page layout from javascript of current page in sharepoint 2013? Ideally I would prefer to not use any ajax calls. Thanks
0
votes
2answers
84 views

How to add an default Image to SharePoint list item?

I have a column named photo How can I add a default image in a list item, which in my case is photo? for example If a user does not have the proper image for an item, or if he forget to add image. ...
0
votes
2answers
67 views

Filter Conditon in Rest API query Not Working

Here ESI_ProjectSeqNoLookup/Id is a Lookup Column so expand used and filter ESI_AFENo type is Hyperlink or Picture. This query is not working. query.RestQuery = "getbytitle('RFA')/Items?$select=ID,...
0
votes
1answer
34 views

Filter Condition in Rest API query with passing textbox value

The below mentioned query is correct or not because i am not getting the textbox values. #txtAFENo. It is textbox id , passing directly the textbox value. query.RestQuery = "getbytitle('RFA')/Items?$...
0
votes
1answer
45 views

SharePoint Apps and Promises / Deferred when performing work on data

I have found allot of resources which point out how to handle a simple promise or deferred Async call in SharePoint apps. (for example) But I cant understand how to properly use a promise if I am ...
0
votes
1answer
32 views

Javacript with MDS loads each way only one time

i like to do a simple javascript execution with MDS and without MDS. To do this, I have used this Javacript only executed on first page load HowTo to get work. The Problem i have, is that the script ...
4
votes
2answers
323 views

jQuery CDN reference in SP Online MasterPage changed magically

My custom MasterPage deployed to SharePoint Online contains two links to JavaScript libraries on CDN's. Like this: <script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js">&...
0
votes
3answers
39 views

Javascript file mapped to a Lists

One of my SharePoint List running on SharePoint 2013 has a Content Editor WebPart which is mapped to a Javascript file. If I save the SharePoint List as a Template, will it store the Content Editor ...
0
votes
2answers
23 views

How to connect non-sharepoint site to create items in SharePoint (both on same machine)

Scenario: I've created a custom list 'TestList' in SharePoint On this same server, I created a simple (non-SharePoint) website in pure HTML Please how can I connect the form on this (non-...
0
votes
1answer
43 views

Add a script to all SharePoint lists?

Recently I've added a script for one of my Custom Lists in SharePoint Enterprise 2013 which will make Sticky Headers. It was very use full and now all of my users asked for the same capability in ...
0
votes
1answer
29 views

How to get specific string from the email content that store in the SharePoint and show the string in the another column?

If the email store to document library (not as attachments to other list items). How I could just retrieve the specific string from the email text for the current user and show the result in the ...
3
votes
2answers
226 views

Display online users (SPO)

I have a requirement for SharePoint Online users to see what other users are currently online. Is there a way to achieve this with client-side code? Javascript/jQuery?
0
votes
0answers
82 views

Copy list item value to another in SharePoint using REST API

I am trying to auto increment a value for a specific column in SharePoint list. How to copy list item ID value to another column of of a SharePoint list (e.g ProjectID). I tried this code '...
1
vote
2answers
43 views

JS Error in sp.runtime.debug.js

sp.runtime.debug.js?rev=VFkBZgkYpbAZS6abSrBqIg%3D%3D:2814 Uncaught Sys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null. This is in: sp.runtime.debug.js SP....
0
votes
1answer
64 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
255 views

Javascript csom to get lookup/person or group value

I am trying to get values of few lookup columns and person or group column of my list using the below code var context = SP.ClientContext.get_current(); var web=context.get_web(); var list=web....
0
votes
1answer
28 views

Why is my SharePoint site still caching an old javascript library I stopped using?

I have copy and pasted a html form with libraries attached being linked in embedded code. I've gotten rid of all references to one library but I'm still getting the following error: (Internal ...
0
votes
1answer
34 views

Start Workflow from ModalPopup and close it using jquery

I am calling workflow from modalpopup on form submit and closed popup after it. Here is the code on submit button ECS_ProviderSubmit.js: ECSDalMgr.ECSModule.updateItemRequest(old_data.__metadata.uri,...
0
votes
2answers
26 views

SP13: Upload Image and Appear on a Page

Scenario: I am not sure if this is an out of box way to do this. If I upload a photo to a library I want the photo to appear on the home page in particular section of the page with a border...etc. ...
0
votes
1answer
87 views

Retrieve list items using Search API

My requirement is to retrieve list items using search API instead of rest API. I have used a content type for the list but I am unable to retrieve the items in the List.This is due to the incorrect I ...
0
votes
1answer
60 views

Add current user (read) to contributor permission group on page load

I want to add current user(read) to contributor permission group on page load but below code is alerting 'undefined': var user; var spGroup; function AddUserToSharePointGroup() { var clientContext = ...
1
vote
3answers
115 views

JavaScript not running in Script Editor

I have a script editor web part on a page in my site. I have the following code in it: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <...
0
votes
0answers
20 views

Make this code to Asynchronous to Synchronous call in Javascript using for loop [duplicate]

I am having values in result[15452,33616] when using for loop ,The for loop for i=0 it takes the value of result[0]=15452 ,it is not going to async function.The loop continuing ,after loop over only ...
0
votes
2answers
49 views

update list code doesn't seem to working

I am trying to update to update list when user clicks on "Edit" button but below code doesn't seem to be working.. <h1 align="center">DemoList</h1> <table id="maintable"> <tr> ...
1
vote
0answers
85 views

SharePoint 2010: Use JavaScript to Create Document Library List Item from Content Type

I have two document Content Types with a Document Template attached. The Document Template has quick parts (document properties) that reference back to fields in the content type. We are required to ...
1
vote
2answers
37 views

Add a Comment to Field items on a List

Basically I am attempting to replicate Excel's ability to add a comment to an item on a list. (The little popup boxes that can be added to Excel cells that come up with a mouse hover or click) I would ...
0
votes
1answer
87 views

SharePoint Query String Filter not working with space

I am creating a url that looks like this: "http://servername/sites/mywebsite/sitespages/page.aspx?ProcessName=my initial process" But when I redirect SharePoint to that page using: location....
0
votes
2answers
44 views

How do I insert the referring page URL into list column in SP2010?

I have a feedback form (newform.aspx) which will be linked to from many different collaboration sites in SP2010 site collection. I would like to capture the referring page and insert it into the form. ...
0
votes
4answers
89 views

Hide empty columns in view

its possible to hide empty column(s) from view(webpart) in Sharepoint 2013? I was looking for any javasript solution, but unfortunately i have found only solution for boxed style. Hide columns from ...
0
votes
2answers
58 views

How to give group visitors permission to run custom JS?

I have a custom JS file located in siteassets in the homesite https://companyxxx.sharepoint.com/SiteAssets/scripts/custom.js I have added this JS file in the masterpage of one of my collections and ...
0
votes
1answer
46 views

Sharepoint 2013 REST Retrieve list info presave items

I have successfully retrieved a specific item using REST with SP2013. Issue is that value is populated AFTER page load hence I cannot do a comparison on PreSave event. It shows as undefined and later ...
0
votes
1answer
73 views

SP.ArrayListEnumerator check if length = 0

I have one object in my code that is of type SP.ArrayListEnumerator, and I want to check if its length is 0 or not. How do I do that using JavaScript?
4
votes
0answers
62 views

Replacing SOD with fetch (handling JS library dependencies - *in the future*)

Anticipating a future, I am experimenting with User Custom Actions in the new Document Library View Microsoft has so kindly provided to the First Release Office365 tenants. Since there is almost ...
0
votes
0answers
33 views

How to Dynamically Change a Value in the Column of the Current Item Through Clicking Hyperlink in Email

I have a script on Content Editor Web Part that me and my coworker tested on a list called TextTestList. The requirement is: When user clicks a hyperlink in email, received from a Workflow, that ...
0
votes
1answer
38 views

Can UserCustomActions run on a web only?

In a site collection there is a particular subsite where I need to apply a UserCustomAction. It will be a basic JavaScript function that prompts for acknowledgement and sets a cookie. The need to do ...
2
votes
1answer
85 views

Call Javascript code in Custom Ribbon Action for office 365

I want to call my javascript code in custom ribbon action in SharePoint online. I tried this code. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas....
0
votes
1answer
88 views

Color a cell based on content in list

I am a JavaScript and SharePoint novice. I would like to change the cell color based on contents using Client Side Rendering and JavaScript. I have had good luck with changing rows with you fine ...