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)

7
votes
2answers
341 views

What are the Type.registerNamespace advantages over standard JavaScript methods?

Now I dive deeper into the world of .Net developers I notice more and more Microsoft ways of doing things unfamilair to me as a (once LiveScript) JavaScript developer. I see PnP and other blogs using:...
1
vote
3answers
25 views

Same solution displays different links on different servers

I created a farm solution. One of the webparts retrieves data from internal rootsite. <script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script> In the test ...
0
votes
1answer
33 views

Converting symbol to string

var TitleVal = encodeURIComponent($("[title='Title Required Field']").val()); // Title has value "car & bus" //decodeURIComponent(TitleVal); var allOptions = document.querySelectorAll("[title='...
0
votes
0answers
41 views

Javascript calls a web service using Ajax and returns custom error message

The code is using a Javascript calling a web service using Ajax. jQuery.support.cors = true; $.ajax({ url: url, data: { format: 'json' }, error: function() { alert('...
0
votes
0answers
63 views

SP services to filter list form web part

I have a project requirement where I need to filter the column value based on current logged in user. This needs to be done in Designer using either Javascript/Jquery or SP Services. NOTE: The ...
0
votes
1answer
90 views

Upload JS file on asset library

We have a SharePoint 2013 enviroment were we are unable to upload JS file to a an asset library from client machine, while it work ok if we upload from inside the server. How can we resolve the issue?...
0
votes
2answers
240 views

Javascript/CSS File Not Loading But is on the page! SharePoint 2013

I am able to see the the javascript files and css files in the code from the F12 Developer tools but the scripts/CSS files only load when i am logged in the Anonymous User it does not load. Is there ...
1
vote
1answer
106 views

get_lists results in access denied

I am using the code below to get all the list of a site. However the user might not have access to all lists, so how can I get only the list the current user has access to? When accessing the site ...
1
vote
2answers
647 views

Can I run javascript based d3js.org on Sharepoint?

I'd like to try using D3.js and have access to microsoft hosted SharePoint sites. Is this possible? Where do I start on the Sharepoint side? Specifically, where can I put the .js files and the ...
0
votes
1answer
580 views

how can I collapse all groups in a sharepoint list upon page load

How can I go about collapsing all groups in a sharepoint list upon page load? I tried putting the following in a script editor web part (based on this page http://www.sharepointdiary.com/2014/07/...
0
votes
0answers
33 views

Why Sharepoint call resize function on page load?

I have a JavaScript in my WebPart with a resize function, which should only be called, when the window is resizing. But the function will also be called, when i make a refresh. Does anybody know, why ...
0
votes
1answer
50 views

Changing form select value from query string

I'm really struggling with this - have found a number of 'almost' answers but I cant quite get there! I have a form with a select field (EventID) (This is a lookup from another table) that I want to ...
0
votes
1answer
428 views

Hide fields until a value in a radio button is selected

My requirement is that i have a radio button on a New Item form with the values of Yes/No. If No is selected, i need to be able to have 10 fields appear (single line of text) so that the end user can ...
0
votes
0answers
34 views

Correlation Error in Sharepoint Online app

I am trying to change an app to apply a custom action recursively to every subsite of a site collection. The code segment for that is below. I keep however getting the following error: Something ...
1
vote
0answers
26 views

unable to use getElementsByTagNameNS with a JavaScript SOAP 1.2 call to lists.asmx

For reasons I do not understand, even though the call is successful and I get data back, I cannot retrieve nodes using getElementsByTagNameNS on xhr.responseXML when using SOAP 1.2 calls. Hopefully ...
1
vote
1answer
40 views

Trouble adding Breadcrumb settings to Master Site

I need to add the 'Breadcrumb' file path into our new Sharepoint Online. I am totally inexperienced with configuring Sharepoint. I found a piece of JavaScript code from here I've added it to the ...
11
votes
2answers
521 views

Sharepoint 2013 - show ribbon to admin only

Is there a tutorial or specific bit of code I can use to hide the ribbon for all users except admins or a user group? This needs to be for sharepoint 2013 (rather than 2010) Can anyone help please?
0
votes
1answer
166 views

SharePoint 2013 JS Automatically Generate and Send Email on New Item Form Save

Here is a screenshot containing the references below: BACKGROUND (the numbers correspond with the items in the screenshot) The 'Add New Item' button is pressed, which causes the 'New Item Form' ...
0
votes
0answers
20 views

Unable to retrieve the properties ' selectLayout ' null reference or undefined

Ssometimes I have problems when I have to add an item or a complete change from a list previously created . In these cases it happens that the ribbon is unusable and the javascript error returned is ...
3
votes
1answer
276 views

Javascript - Get text from display version of multiline field

I need to get the text from a multi-line field in display mode on a custom form. SharePoint decides to wrap the text in an extra div which is not on the .aspx page which is causing the problem as I ...
3
votes
2answers
194 views

How to consume SP REST using only JavaScript\CSS\HTML5 (from CRM, outside Sharepoint, same AD)

How do I do to consume a REST DataSet using only something like JQuery? For example, if I have the items in a list\library and retrieve them as follows: https://[sharepoint]/_api/web/...
1
vote
2answers
59 views

sharepoint list jquery javascript

I have checkbox field "Department" with values ( De beers, Platinum, gold, silver) and another single line of text "Design". When any user select "De beers" from checkbox, then "Design" field should ...
2
votes
1answer
183 views

Freeze list header Row while Scrolling in SharePoint [duplicate]

How to freeze list header row while scrolling in SharePoint?
1
vote
1answer
34 views

get user information by account name or e-mail for users that are not in the site's user list using javascript in 2010

I have either a user's e-mail address or account name. I need to get their other information like name, department and title. Everything I have read online only works if the user in question is in ...
0
votes
1answer
36 views

Entire Lookup Row to Appear in Dropdown

I hope I can explain this clearly. I am working in SharePoint 2013 and created a custom list that I pulling the data from that list into another list using lookup columns. For example, ID# is one of ...
5
votes
1answer
340 views

Get List Template ID JavaScript

I have some code that returns all of the lists in my site however I need to only get lists that are using the discussion board template and I have hit a stumbling block with this. I currently have ...
4
votes
1answer
107 views

SharePoint Workflow Subscription Service failed

I have one requirement to start the SP workflow through JavaScript. For this, I have wrote some lines of code to start the workflow. But I am getting a Subscription failed error due to undefined ...
7
votes
1answer
272 views

SharePoint JavaScript REST Api, how is the access token passed

I have the following code in my SharePoint add-in (SharePoint Online). Simple code just to load the list items, the code works fine $.ajax({ url: appweburl + "/_api/web/lists/getbytitle('...
3
votes
1answer
61 views

Short Javascript script to detect if an item value with yes then redirect sharepoint page?

Is there a way to place a small JQuery/Javascript code to detect if an item list value is equal to yes and if so redirect the page using Content Editor Webpart? If "Status=no" Then <meta http-...
0
votes
0answers
34 views

Template ID transfer field data to a different list SharePoint 2013 online

I have created a list (lets call this list1) and saved it as a template g_wsaListTemplateId = "108"; g_wsaSiteTemplateId = "STS#0"; I need to create some JS that will run when this template has ...
1
vote
2answers
251 views

<FORM> tags are not supported in custom page layout

I am creating a custom page layout (I am also using a custom masterpage). I have created a CEWP and linked it to a notepad file, the file is just HTML and Javascript <table border="0" width="200" ...
0
votes
0answers
31 views

Compare Microsoft Project Owner to Current user

Apologies for the cross post but this may be the better forum to post this question. My short question is I would like to use JavaScript to compare the currently logged on user to the Microsoft ...
2
votes
2answers
130 views

Displaying Column Count Only

Not sure if this is possible, but I want to be able to show the total count of column without the line items present. The way I was thinking to approach is to create a calculated column then show ...
3
votes
1answer
52 views

How can I trim the Decimals from these search results?

I have a built custom search template for a SharePoint Online site collection to return results in a tabular form. The template works and returns the desired data but some of it is not in the format I ...
3
votes
1answer
152 views

SharePoint 2013 add Read More link in a webpart Announcements using JavaScript

I have created a slider using bxSlider and it works perfectly, but in case to show all text that comes from Announcements List, I want to display only 100 characters and show read more link which it ...
4
votes
0answers
234 views

'Permission denied' javascript error on modal window opening in IE8

While opening any modal window (NewForm, EditForm, custom or OOTB) on a SharePoint list in Internet Explorer I get few SCRIPT70: Permission denied errors. This causes problem with saving the ...
10
votes
1answer
540 views

set column order of fields using CSOM/REST javascript

I am creting list fields using CSOM ecma script. How do I set the column order of the fields to be displayed in the form programmatically? For eg: I have created the following fields programmatically :...
0
votes
0answers
10 views

Is there a way to get the IDs back in response of newly created documents when uploading multiple silverlight control

I need to provide the ability to allow multiple documents at once while allow for a couple of parameters as meta. So is there a response body object that comes back from the server when using the OOB ...
1
vote
2answers
359 views

Fetch value of people picker column using javascript - SP2010

I'm using a function to grab the id from the url of the record and fetching numerous field values successfully. It seems to work fine for all fields except for people pickers. When I display the ...
8
votes
2answers
252 views

Basic batched get requests using REST API

I'm hunting around on the web right now for some basic (preferably working) examples of making a batch of get requests using the new $batch endpoint in O365 with the REST API. I've located some good ...
4
votes
1answer
130 views

Can we unlock a ShortTerm lock via CSOM for SP2013

We are using SP2013 with OWA installed. Users often complain about a file stored in SharePiont being locked by another user not in office. Error is "The file "xxxx" is locked for exclusive use by ...
2
votes
0answers
76 views

Starting List Item Workflow using Javascript on custom edit page

I have a custom edit page with some Javascript inserted using a CEWP. From this page I am calling a function to start a list item workflow on the current item being edited. I am using the following ...
4
votes
1answer
175 views

REST API compare current user if exist in a custom list

I have a custom list with 37 user fields, I need to check if the current user is in one of those fields to display an alert. I'm getting the current user with this url: /_api/web/currentUser And ...
7
votes
5answers
140 views

URL redirect from a button

I have added a button into my SharePoint list using SharePoint designer. I want to be able to open a document from the button. So I go the url for the word document by going properties on the normal ...
2
votes
0answers
30 views

how to show less a text [closed]

I have created a function which duty is to Show more text. But i cannot create a Show less to show less my text i have the following html <div class="item"> Ronaldinho joined Barcelona in ...
1
vote
1answer
570 views

Javascript Does Not Work in Internet Explorer

For my list I have created a custom NewForm.aspx and EditForm.aspx that uses a custom stylesheet and javascript/jQuery with spservices. The page works wonderfully in Firefox. But when I open the ...
1
vote
2answers
80 views

Disable Term Store Input Fields

I would like to disable input fields for managed metadata from the term store in a new item or edit item form on a custom list. How could I do this with javascript and jquery? Should work in Chrome ...
3
votes
1answer
194 views

REST call to get list not working

I would like to make a function to pass a list name, if it exists, then append random number to its name and create a new one, if there's no list with the passed list name, then create it. So I am ...
0
votes
0answers
22 views

Logout inactivity javascript file not working [duplicate]

I 've done the following steps, however, my .js file doesn't do anything. 1- I created inactive.js file : 2- added .js file to seattle.master file in sharepoint designer 3- added inactive.js to ...
2
votes
2answers
305 views

SharePoint 2013 - ScrollTop not working properly on second click

This is the weirdest thing. I have the following javascript code, which causes my page to scroll to a specific location on click... $('.whyattend').on('click', function (e) { e.preventDefault(); ...