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.
2
votes
1answer
18 views
How to restrict the number of lines to show using jquery or css?
i have created simple Custom webpart.
It looks like
in that web part, Description display multiple line .
i have used html P tag to display Description value
<p>Loream IpsumLoream ...
0
votes
0answers
20 views
JS Link and CSR: Error After Filtering and Viewing/Editing
I have a *.js to color code my rows according to the value of the column Status. It is working very fine UNLESS one filters any column and views/edits an item.
After exiting the item view, the ...
0
votes
0answers
19 views
Save conflict - reset ratings and ratingscount in presaveaction
In my Editform I wish to reset all the ratingcounts on save, however I am getting an error message
Save Conflict. Your changes conflict with those made concurrently by another user. If you want your ...
0
votes
1answer
19 views
ModalDialog // change title when dialog openned
I open popup modal dialog with something like this:
openInDialog: function (dlgWidth, dlgHeight, dlgAllowMaximize, dlgShowClose, needCallbackFunction, pageUrl) {
var options = {
autoSize: ...
0
votes
1answer
39 views
Uploading File with rest api and HTML5 api
I am using SharePoint 2013 on premise. I am trying to upload file to the custom list from custom webpart purely jQuery and javascript. In my form I have hyperlink, when I click on it, it will open ...
1
vote
4answers
51 views
change SharePoint list field color using jquery code base on value?
I am working with SharePoint list and I need to change the Number field color if it is greater than 60. I tried to change the code below but it did't work. I also checked all answers but none of them ...
0
votes
1answer
17 views
Fetch the document name from Document Library using Document ID
I have a Document Library with multiple documents. One can select multiple documents even all the documents at a time.
I need to fetch the documents name which are selected in Javascript using JQuery ...
0
votes
1answer
21 views
Trying to Start SharePoint workflow from code
I have what may be a familiar piece of code for starting a SharePoint 2013 workflow, except mine fails with an error of "Error: Value cannot be null.
Parameter name: subscription
undefined." The log I ...
3
votes
1answer
33 views
How to know which people picker is which
I'm trying to replace all of the "bad" old-style people pickers on our custom new/edit forms with the new good client-people pickers.
With this thread I came up with the idea to use jquery to find ...
1
vote
0answers
15 views
CSR: ScriptLink/Custom Action CDN Libraries load after JSLinked files are loaded
I am almost to 2.0 with the generic iCSR support library.
Having some issues with deployment:
Adding the library as SiteCollection ScriptLink/Custom action loads it before msajaxbundle where ...
0
votes
1answer
25 views
changing field values by js // ClientFormPostBackValue // webparts
i have kinda strange issue here.
i have an item form. on that form i placed a webpart list view. this webpart list view is binded to my item by ID. this ID i placed in a simple input text field.
...
0
votes
1answer
30 views
New/Edit form how to tell if people picker is multiple or single with code
I'm doing some manipulation of my new and edit forms using javascript and jQuery. I'm able to find all the people pickers on the page with the following selector
var $pickers = $('div[title="People ...
1
vote
1answer
45 views
How to get current master page and change it on the Site using javascript
I am using SharePoint 2013 Online and I'm looking for some JavaScript and html to get current master page for the site and change the same with other master page.
If anyone could help or just point ...
0
votes
0answers
10 views
JavaScript editor on my jsfiles in CSR code library
I want to edit the javascript files in editor by user with edit rights inside SharePoint not with external editor. Cisar does this but its an extension i need the editor to work in all browsers.
1
vote
1answer
40 views
Is it possible to write any c# code in SharePoint hosted app?
I want to render some code dynamically so is it possible to write any c# code in a SharePoint hosted app?
And if not, then what are some alternative approach to achieve such goal?
1
vote
0answers
30 views
CSR: RegisterModuleInit without hardcoded JS filename?
Always looking to make CSR development easier...
This the typical CSR programming pattern:
We hardcode the filename inside the CSR file
SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", ...
3
votes
0answers
35 views
How to stop a SharePoint workflow using JSOM
Let me preface by saying that I'm a relative newbie to this SharePoint stuff and am still fumbling my way around a bit learning from code examples where necessary. That being said, I have no issue ...
1
vote
0answers
13 views
Adding documents into a Document Set folder in SPO by busing Javascript
I am working on a project where I have to build the logic to upload documents into document set folders and I am stuck building the end point.
Can we work with document sets in the same way we do it ...
0
votes
1answer
31 views
SharePoint Online (Office 365) - AutoResolve people picker with current user and detect change in people picker value
I am trying to implement a solution in SharePoint Online by customizing the NewForm.aspx page of a out of the box Calendar List using javascript with the following requirements:
When page loads, a ...
0
votes
0answers
21 views
Export the Html table to Excel [closed]
I am googgling for the javascript to wite in JS file ,But found no luck to export the html table content which is getting data from sharepoint list.Can any one help me how can i do this.
Thanks & ...
0
votes
0answers
20 views
JavaScript not firing after Page Refresh or Paging
I'm using some JavaScript to manipulate a list view, such that the clicking of a button (provisioned through a calculated column), will redirect a user to another page. Based on the reference in ...
0
votes
1answer
26 views
Need suggestions to attach JavaScript function to SharePoint search button click
I need to attached custom JavaScript function to SharePoint 2013 search button click.
When user enter some text in search box and click search button or click "Enter" key, my custom JavaScript should ...
0
votes
0answers
21 views
Managed Metadata Global Navigation
I’m using managed metadata to create global navigation on a SharePoint Master Page. I understand that a managed metadata term set can only be applied to a single site collection. To bypass this I’m ...
0
votes
2answers
28 views
how do i create a custom UI for a list column
What is the best way to create a custom feature to customize the UI of a list by filling in the column and/or field green when the value for row item = yes/no?
0
votes
1answer
37 views
How to change the font of column name
Is there a way for me to change the font size/ family for a particular column name for Default New Form web part. (jquery/ SPD) Like the following image (diff from default style) Thanks!
1
vote
1answer
56 views
Check if View (GUID) is displayed on the current ASPX page
Result of eXtreme Programming.. (and too early to drink wodka)
I am sure there is a one-liner to check if a View is displayed on screen
function webPartOnScreen(guid) {
guid = guid.replace('{', ...
3
votes
1answer
35 views
Trying to Skip an empty field. Returns null instead
I am trying to pull data from a list, but skip any that are empty. Below is the portion of my JS link that Is having this error:
var description = document.createElement("a");
description.innerHTML = ...
-1
votes
1answer
32 views
Getting list items in SharePoint Hosted App for Office 365
I want the code snippet for Getting the list items and Show it in the App page. I'm creating SharePoint hosted app for Office 365. How do i get the list item values?
Thanks in Advance
1
vote
1answer
33 views
Reset ratingcount for list item using javascript
I wish to reset the ratings for an item after a list item is edited. I can get the Average rating to be reset back to 0, but not the ratingCount. How can I do this?
The code I am using is
var ...
0
votes
1answer
22 views
Birthday Icon on the Curren Date
I have a Calendar which show the birthday reminder for our users , everything is going good but now I want that my calendar will show a small pic on a current date if there is anyone's birthday in ...
1
vote
1answer
38 views
Custom pagination
I have a SP list called "Company" containing 6000 items.
Also I don't have access to central admin nor I have a site collection administrator permission(also no designer access).
I want to create a ...
1
vote
0answers
23 views
Active ADFS authentication, token is always invalid
I am attempting JS-based ADFS authentication to consume SharePoint resources.
I am using active authentication (browserless) to get a SAML token from the ADFS server. A portion of the XML I get back ...
0
votes
0answers
23 views
Javascript with MDS in Visual Webpart
I need to include a Javascript file in my visual webpart, but using the Minimal Download Strategy.
The problem is when i would like to include a SharePoint:ScriptLink tag in my ascx file, i have some ...
0
votes
0answers
17 views
Webpart that uses CSS fixed positioning
I have a two column webpart page. On the left side is a link list webpart, which I would like to stay in sight as the right side scrolls. Is this possible? I did see an example which did it with the ...
-1
votes
0answers
13 views
How to get managed metadata value while adding new item(in NewForm.aspx page) for validation
My list contains one 'managed metadata' field. When i'm trying to add new item to the list--'NewForm.aspx' page--
I want the value selected in 'category/sub-category' --i want the name of main ...
5
votes
1answer
55 views
is current ASPX page a List or Library page?
Is there a better way of testing if the current ASPX page is a List (or Library) page?
I now have:
if(
!(
document.location.pathname.indexOf('/Forms/')<0
&&
...
1
vote
0answers
12 views
Create a custom permsetup.aspx and add extra text fields for new groups
I have the following requirement:
When a user creates a new site via Site Settings\Site Content\New Subsite, and he selects "use unique permissions", the user is redirected to the page: ...
0
votes
1answer
41 views
Get field value in modal list item display dialog on Sharepoint Online
I have a basic custom list with items that open in a modal display form. I need to get the value of one of the fields, store it in a javascript variable, and further process it. How do I get the field ...
6
votes
0answers
103 views
When JavaScript runs
Working on an overview of all possibilities of adding JavaScript.
Can someone confirm Custom Actions run **after JSLinks**
By execution order:
Page Scripts
using <script> tags or scriptlink ...
0
votes
2answers
21 views
SharePoint Forms Fields depend on User
I hope you all are doing good. I have an query regarding SharePoint forms I hope if anyone can help me out.
I want to create a SharePoint form where a member from any department can ask for a leave, ...
0
votes
1answer
34 views
Display Profile Image, Can't Select Picture Url
I am attempting to retrieve some profile properties for the current user, and am having a hard time with the profile picture Url specifically. Version is Sharepoint Foundation 2013.
When I open the ...
0
votes
2answers
19 views
Color coded calendar 2007 versus 2013
I have a calendar color coded in SP 2007. Its working good. I used the same code in SP 2013, but it doesn't work there. Any Suggestions?
<script language="javascript" ...
0
votes
2answers
46 views
Get User ID from ClientPeoplePickerWebServiceInterface Web Service through Javascript
I am using this webservice
/_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.clientPeoplePickerSearchUser
to build an autocomplete solution for my SP app. The problem is, the ...
1
vote
0answers
26 views
JavaScript: add AD security groups to list item permissions
I use the code below to group permissions on list items. This works fine for SharePoint groups.
How'd I do this for AD security groups?
(SP2013)
restrictToGroup = function( a ) {
var ctx = new ...
0
votes
1answer
38 views
Logical operators are not working in JS file
Everything is fine I am able to fetching the data from SharePoint 2013 List using CAML query in my js file.
But when i try to get the data via dropdown conditions my code is executing in the else ...
1
vote
1answer
26 views
Showing Item context menu in custom Javascript page
I have created a Javascript page, that uses some REST calls to query a list (actually several lists) and shows some highly customized output. All this is working quite good. My final requirement is, ...
1
vote
2answers
54 views
Delete all items in Recycle Bin using javascript
Is there a way to batch delete all items in the recycle bin on the client side in SharePoint Online?
I've tried using javascript:emptyItems() in the browser but this appears to time out after ...
1
vote
0answers
23 views
request query using jsom for project server (ps.js) another user
request query using jsom for project server (ps.js) another user
i need request a query using another user, no my current user this is possible ?
I'm using JSOM with ps.js for project server 2013
...
3
votes
1answer
65 views
Getting item id from newly created item
I am using SharePoint 2013 Enterprise version. I am using below rest api code to add the record
I kept below code in common js file
function CreateListItemWithDetails(listName, webUrl, newItem, ...
-1
votes
0answers
21 views
How to Bind the Data in JS File
I have JS File through which I am getting the result from sharePoint list via jsom and displaying into html textarea.
Now I would like to display the result in good view.Can any on help me how ...