Questions tagged [javascript]

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.

1,489 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
0 answers
731 views

Losing the selected drop down value when reloading the page - JSLink

I have an EditForm that I am using JSLink to run some javascript that gets the Content Type and then sets the options in a drop down box according to the Content Type. This works fine, but now the ...
Mat's user avatar
  • 33
0 votes
0 answers
25 views

How to separate BCS list and form in two site pages?

I am using a BCS and External Content Types in SharePoint to Update SQL Tables; however, I would like to have this two parts separated in different pages.
David Conde's user avatar
0 votes
0 answers
64 views

modify the min length for the "People or Group" auto complete

i have a "People or Group" field inside my team site, and currently the built-in autocomplete will work after typing 3 characters. so how i can modify this to allow the autocomplete to work after ...
John John's user avatar
0 votes
1 answer
107 views

Which should I use on SharePoint 2010 list item forms? JQuery or InfoPath?

I'm editing some SharePoint 2010 list item forms using InfoPath 2010 and some with JavaScript/JQuery. I know that Microsoft will not support InfoPath after SharePoint 2013. InfoPath is easy to use to ...
newbie's user avatar
  • 1,737
0 votes
1 answer
78 views

Autoincrement with Fresh counters everyday

YYYYMMDD-XX Suppose List Item is created today Its Unique ID should be 20150604-01 20150604-02 ..... 20150604-99 Suppose Item is created Tomorrow Item Unique ID should be 20150605-01 20150605-02 ...
Rahul's user avatar
  • 11
0 votes
1 answer
2k views

How to Import Excel/Spreadsheet into an existing Sharepoint List using Javascript

I would like import some data of an excel sheet to existing list. I see that this can be done using power shell or by using C#. Can somebody help me in doing this using JavaScript by adding a web ...
Koutilya's user avatar
0 votes
0 answers
64 views

populate user data in list form

I have a list with fields name "User name", "Telephone" and "Department", i want that when user click on add new item and open new form. These 3 fields should get auto populate with logged in user ...
Brishal's user avatar
  • 1,205
0 votes
2 answers
203 views

Get current view in Sharepoint Hosted app

I am developing a Ribbon action sharepoint hosted app where user selects any number of items and clicks the ribbon action to Print the list items. In the SharePoint hosted app page I want to retrieve ...
Vipul Kelkar's user avatar
  • 1,534
0 votes
1 answer
46 views

How to show the "new" gif image when a list's date column is equal to Today()?

We have a list with column "Publish Date" and "Title". User want to attach a "new" gif image at the end of "content" if "Publish Date" for that row is equal to Today. From my understanding, the OOB ...
Mark L's user avatar
  • 4,065
0 votes
1 answer
627 views

How to use GroupBy in CAML and produce lists with headings for each group

Using SharePoint's javascript object model, I'm looking for a way to group records in unordered lists with their category (what they're grouped by) as a heading on top. I have gotten so far as to ...
mattsnowkygov's user avatar
0 votes
0 answers
173 views

SP.UI.ModalDialog.showModalDialog errors when trying to render a Wiki Library Page

I'm getting an error when trying to show a wiki library page using SP.UI.ModalDialog.showModalDialog. Other URLs work fine but not wiki library pages. SP.UI.ModalDialog.showModalDialog({"url" : "http:...
IMTheNachoMan's user avatar
0 votes
2 answers
731 views

Email address of Logged-in User using JS Link - undefined

Someone can help me? I use JS link for list and need return current user email. Full script should change the fill line where an email user coincides with the current user: ...
Sergey Zhukov's user avatar
0 votes
2 answers
72 views

Scrip sample file? to connect sharepoint 2013 and sql server in a form

I want to create a template in sharepoint 2013 and connected to an SQL server table, so it will populate with the info entered in a form.
David Conde's user avatar
0 votes
1 answer
1k views

How do I get all current users from a site

I need to get all currently active (not removed users) from a site. I have the following JS that gets all the users but some of them are old users that have been removed from the site (still exists in ...
David's user avatar
  • 173
0 votes
1 answer
54 views

Accordian Jquery Events for Customised List forms

Want to understand how do we differentiate Submit/save event in customized list forms. eg: When we are in Section 1 the submit/save should correspond to data being submitted in section1 when we are ...
Rahul's user avatar
  • 11
0 votes
1 answer
18 views

Javascript search is working in sharepoint 2007 and not in sharepoint 2013

Javascript search is working in sharepoint 2007 and not in sharepoint 2013. Is there version problem?
sheik Mohamed dhanish's user avatar
0 votes
1 answer
2k views

Image Overlay with Text using javascript in Sharepoint referencing to a "List Library" (adjust frame size)

Below is my code for displaying images with text overlay (referencing from one of my list). <style type="text/css"> .myFrame1 { position: relative; overflow: auto; } .myFrame1 li { list-...
lucas's user avatar
  • 13
0 votes
1 answer
148 views

How can I set different event color that are fetched from SharePoint list?

I'm developing sharepoint hosted app that can fetch events from sharepoint list and put on fullcalendar monthly view. I have suceeded to fetch the events but all calendar events have the default color(...
gunu's user avatar
  • 75
0 votes
1 answer
526 views

SharePoint sandboxed solution call javascript function from back end

I have created a sandboxed solution for SharePoint 2013 which contains sandboxed visual webpart. I need to call JavaScript function from back end. How can I accomplish this requirement? How can we ...
Trimantra Software Solution's user avatar
0 votes
1 answer
265 views

page create in Modal Dialog box and return parameter in sharepoint 2010

i need to create enterprise wiki page in Modal Dialog box ,when user enter name of the wiki page after click on save button.then it should return parameter.return parameter use for another process ...
Sonu's user avatar
  • 63
0 votes
1 answer
457 views

Hide certain characters in Sharepoint people picker field

I have a people picker field that is supposed to pull the current user of the infopath form's name and so far it works fine, but when exported to excel it also pulls in some extraneous characters that ...
Sadie's user avatar
  • 21
0 votes
0 answers
952 views

Calling Cross Domain Java Based web service by JQuery AJAX from SharePoint 2013

I am trying to call the Java based Web Service by Jquery Ajax, The URl of the Service is "http://vmABCapp01-staging.domain.com:7083/UserIDCheckService/CheckUserIDServiceImpl". The Jquery Code to ...
Ashok Kumar Sah's user avatar
0 votes
0 answers
990 views

Filtered lookup using SPServices

I have 3 lists: Schools, Interactions, Contacts In the new form for a Interaction item I have a lookup field displaying a long list of contacts, however I need to filter this list to only display ...
Essah's user avatar
  • 145
0 votes
1 answer
189 views

How to combine 2 calenders from 2 different sharepoint online sites?

I've received the assignement to combine 2 calenders from 2 different sharepointonline sites. From what i researched, this is not possible with the out of the box overlay solution SharePoint has to ...
Lschockaert's user avatar
0 votes
1 answer
230 views

Show notification from list form on list view

I have a custom display/edit form for my list. After the form is submitted and the user is redirected back to list view, I want to show a notification that 'new item has been added' or 'changes were ...
n0e's user avatar
  • 307
0 votes
1 answer
1k views

How to change default view of library using javascript or programatically?

I have a requirement where I have to change view based on users logged into the portal. If user belongs to guest view then view should be different and if he is logged in as admin a different view ...
A Beginner's user avatar
0 votes
0 answers
179 views

How can I take some user input (html or markdown), transform with XSLT, and write the resulting file to a library?

Not looking for a solution here, just something to get me started in the right direction. I would like to create a page that takes some user input from a textbox (markdown would be cool, but HTML is ...
Chad Dybdahl's user avatar
0 votes
1 answer
193 views

Remove line break from text in JavaScript (variable value from XSLT)

I need get a variable value from XSLT in search result in SharePoint 2010. But this value is muti-lines text. When I add this variable value in JavaScript, the JS code cannot work, because the line ...
AnnaCICI's user avatar
  • 533
0 votes
1 answer
1k views

Concatenating a javascript variable into a camlQuery

I have a caml query that I'm concatenating with a javascript variable of type string. It queries the column names 'Audience' and returns the first 3 ordered by the newest. The variable subsite gets ...
matt's user avatar
  • 35
0 votes
1 answer
216 views

How to display application web form in modal dialog?

I have the following code of application page formdem.aspx: <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> &...
A Beginner's user avatar
0 votes
1 answer
991 views

Get document from Document Library using Javascript

I am trying to get a document from document library.I am getting the file but I can't get its binary value. $.ajax({ url: fileUrl, binaryStringResponseBody: true, headers: { "...
user avatar
0 votes
1 answer
65 views

OpenLayers 3 zoom to mouse location pulls off to the left in SharePoint

I am currently creating a web application using OpenLayers 3 that aims to be embedded into SharePoint using the Script Editor tool. For the purpose of this question assume I am just using a basic map ...
Joshua Dickerson's user avatar
0 votes
1 answer
248 views

OData query operations in SharePoint REST requests

I have a list of id users, and I need to get listitems which are created by those users's list. I use this code to get it : > for (var i = 0; i < listId.lenght; i++) { var ...
Imen Turki's user avatar
  • 2,183
0 votes
1 answer
5k views

SPService GetListItems with CAML : can't get the example to work with status giving error

I am new to SPServices and trying start with example GetListItems. Below is my code $(document).ready(function() { GetTasks(); }); function GetTasks() { var method = "GetListItems"; ...
Divya Prakash's user avatar
0 votes
1 answer
648 views

Web Part specific DOM Manipulation. Two identical Script Editor Web Part Code blocks

We have a script editor web part with javascript that references some jquery libraries. The code creates web part properties and hides DIV tag in the web part based on some conditions. It works ...
Hell.Bent's user avatar
  • 1,299
0 votes
1 answer
48 views

display number of text columns depending on number choosen in a choice column

I want to create a jscript to display number of columns depending on number of columns choosen. e.g if i choose 1, it should display column 1(text) and if i choose 2 it should display two text columns ...
Jas's user avatar
  • 1
0 votes
2 answers
219 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.
user40754's user avatar
0 votes
2 answers
45 views

Value of field based on other value field in New Form SharePoint

Here in the picture you can see how it looks like. I want when in 1 Variable Daten is empty then 1 Anzahl Stunden and 2 Variable Daten to be empty.
Anto Andrijanić's user avatar
0 votes
0 answers
521 views

is it possible to retrieve the current value in sharepoint list item before save

I have a sharepoint list. On the edit form of list item i have a custom action button to send the mail containg the contents of the list columns . If the user changes any value in a column and then ...
Deepika's user avatar
  • 505
0 votes
1 answer
1k views

Rest API authentication

I need to use the SharePoint Rest API from a custom JavaScript application (outside from SharePoint). How can I authenticate the user to use the Rest API. I can not deploy a SharePoint app, I need ...
Nk SP's user avatar
  • 2,893
0 votes
0 answers
119 views

Change selected items order and merge using Javascript

I am now able to get the selected list items and merge its contents. Is there a way to reorder the selected items before merge? Or is there a way to get the items in the order in which they are ...
Keerthi's user avatar
  • 1,113
0 votes
1 answer
299 views

Can I disable MDS on a single web part page

I have a custom list on a custom web part page with scripts that affect color coding as well as clickable attachment icons. These scripts do not execute when the list is grouped, and the groups are ...
imthatguy87's user avatar
0 votes
1 answer
51 views

client side IDs of share point elements

I need to hide some menu items that come OOTB on sharepoint pages. I can do this through javascript/jquery, but am not sure how consistent are the client side IDs of various elements on SP pages. I ...
Aamir's user avatar
  • 411
0 votes
1 answer
1k views

Reset sharepoint lookup with None option using jquery

How to reset the lookup value to None in Editform.aspx page using Jquery. I want to empty the lookup dropdown if text box does not have any value . Here is the code which i have tried.I was able to ...
santosh kondapalli's user avatar
0 votes
1 answer
127 views

Issues with height when setting app part width and height via postMessage

I'm currently using the postMessage function to set the width of my app part which is working however I've got a few issues with height. The height is set using $('.container').outerHeight(true); ...
Ben Short's user avatar
  • 287
0 votes
1 answer
175 views

Javascript to display defaulteditform in modal dialogue used by sharepoint

Does anyone have the javascript required to display the defaulteditform in the modal dialogue that SharePoint (v2010) displays an edit form in ? I'd like to add this to my html ?
JMR's user avatar
  • 1
0 votes
1 answer
394 views

Javascript running only in edit mode

I have included a js file in the content editor but it runs in the edit mode only. I have tried all the suggestions like Including text/javascript Include code between execfunc() But it still doesn'...
Keerthi's user avatar
  • 1,113
0 votes
1 answer
38 views

need to update the item in the list

I have a list called revision. It has a columns called wbscode and revisionnumber. Wbscode contains code of the project(eg.pcode1) and revisionnumber is to store revision number done for the pcode. ...
sherin's user avatar
  • 159
0 votes
0 answers
96 views

Setting Url Variable for Sub site

I'm trying to create news list system. I wanted to set Url Variable via Javascript and get the item back by id to display details. Everything went good but when I try to href /subsite/pages/default....
Ahmed Aborady's user avatar
0 votes
1 answer
26 views

Working on a Support Wiki, have some embedding questions

I'm trying to embed javascript that would allow me to create HTML links that open in new windows of a specific size. Is this possible and, if so, how?
Josh Waclawski's user avatar