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.

Filter by
Sorted by
Tagged with
0
votes
1answer
604 views

JS Link create a Column / read metadata of a document

I'm new to SharePoint and JS Link. I have to read the metadata of a document in a document library. If the document is locked for the current user, I want to create an extra column and display an ...
0
votes
1answer
2k views

How to always open documents in a document library in a new tab for Sharpoint 2013 Foundation

How do i tell Sharepoint to always open documents(mostly .pdf and .docx/.doc)in a new tab when they are saved in a document library? This has been disgussed in another questinon before. I tired to ...
0
votes
1answer
237 views

Connect to SharePoint data with JS

I have following link that have XML data from SharePoint http://appsrv/pfa/_api/ProjectData/Projects?$select=ProjectName,ProjectStartDate,ProjectPercentCompleted and I have a username & password....
0
votes
1answer
75 views

Retrieve users into particular group using Javascript

I have created 2 groups(epm and mobile). I inserted some users into particular group. How can I retrieve users based on current group? For example in a dropdown if I choose emp group I want to show ...
0
votes
1answer
92 views

How to find and replace specific words on a 2013 Community Site?

When you create a new Community site, you'll see the Discussion list. Just above that is a button where it says "new discussion". Below that is a view called "My discussions". See screenshot below. ...
0
votes
1answer
880 views

where to put C# code and where to put Javascript code in .aspx form in SharePoint Designer

I am newbie with sharepoint, struggling but finding my way. I have created a list and created a new form called NewFormRequest.aspx in SharePoint designer. I am calling this form in the browser: ...
0
votes
0answers
44 views

javaScript appendChild property

var selectOption2 = document.createElement("option"); // alert(selectOption2); selectOption2.value = results[i].Name; alert(selectOption2.value); selectOption2....
0
votes
1answer
240 views

JavaScript createElement() Method [closed]

What changes should i make to create buttons in the next line. <!DOCTYPE html> <html> <body> <p>Click the button to make a BUTTON element with text.</p> <button ...
0
votes
1answer
883 views

Javascript API calls on AccessDenied page not working

I made a copy of AccessDenied.aspx and added some modifications. See below. All I've done is add some html and javascript to get display information about the currently logged in use. This code works ...
0
votes
0answers
342 views

Create new OneNote notebook from template with filename using JavaScript

I'm currently in a use case that I need to create a new OneNote notebook on SharePoint from a template notebook. I'm coding in Java (web) and for the moment I have this code : Clients.evalJavaScript(...
0
votes
1answer
67 views

Cascading dropdown with long texts(string)

I have a scenario where on selection of service, I am filling services description drop-down, which is working fine. But, since the description is having lengthy texts it looks really ugly. Is there ...
0
votes
1answer
341 views

Retrieve list items with JScript/jQuery - reusable function isn't working as expected - SharePoint 2010

I'm having a bit of trouble creating a reusable function to get various data from SharePoint lists. I'm at a loss as to what to do - everything I've read/searched for implies this code should work, ...
0
votes
1answer
460 views

Create a new custom content type document in managed content type library via CSOM

I would like to add a couple of custom content type documents to a library that has managed content types enabled via 2013 CSOM. Most of the documentation I have seen shows how to upload documents to ...
0
votes
0answers
392 views

Async webpart - the best approach to access outer data source from webpart

I've already tried to search the web but I always get to some point from which I don't know how to get further. I have a Visual web part which needs to load data from external sources (different ...
0
votes
2answers
205 views

Sharepoint 2010 get position of ListItem

I'm working on a custom HTML Form in Sharepoint 2010 and for that I want to read the structure of a list with JavaScript, which contains items and folders. What I did was loading all the Items ...
0
votes
2answers
320 views

Get user properties using JavaScript for use in InfoPath - SP Online

I followed this blog - Pass user information from SharePoint 2013 to InfoPath 2013 It's a really good solution and works well but I want to expand it and get the users department and office location. ...
0
votes
1answer
45 views

How to add Content Types List on a Page and use it to create NEW document/list based on type selected?

I need to show all content types in a drop-down or as hyperlinks along with description on custom .aspx page. When user selects any type, respective New Form should open to create a new document/list ...
0
votes
1answer
826 views

How to have a list auto update once a week and then email the people in the list?

There is a meeting that occurs every week, but has a rotating list of members. So one person from each department goes one week, and the next week it is a different person from each department, and so ...
0
votes
2answers
811 views

Populate a Word Template with Dynamic Data From a HTML Form on a Sharepoint Page

I have a SharePoint site. What I want to do is: 1) Upload a Proposal Template and create an HTML form that allows our sales guys to enter customer details 2) Allow the sales guy to select some options ...
0
votes
1answer
393 views

SP2010 - CEWP not executing javascript until page refresh

The CEWP is loading a HTML page stored in the Site Assets library. The HTML contains a few inputs and some Javascript. Javascript is: Function myInit(){ console.log("here"); Ctx = new SP....
0
votes
0answers
308 views

Javascript Conflict on Visual Webpart when adding multiple times with different webpart properties on single page

What I am doing: I am retrieving list items from list using javascript as per visual webpart custom property. I have created a dropdown in webpart editor part from where I am getting site url. As per ...
0
votes
1answer
192 views

o365 SharePoint Online .. Write to List on another site with Tenant (all sites) NAPA app? Forbidden Error

Is it possible to write to a list on another site from NAPA developed App on o365 SharePoint Online. I have a simple app that can write to lists on the host web by fully qualifying the list, but i ...
0
votes
2answers
548 views

CSOM Search Api error: Unable to get property 'ResultRows' of undefined or null reference

The code below is working fine in my dev machine but the moment I tried to test it on our customer's server, I started getting errors. I started having errors with SP.js. So I used the <script ...
0
votes
1answer
127 views

Cannot run ajax javascript code

I try to run the below javascript code but it does not work. (it does not return the alert pop up) I put the url string into a browser, it return the item info. So, I assume the url is fine. And ...
0
votes
1answer
465 views

How to display Search API results like SharePoint OOTB list with filtering, sorting, paging

I would like to display Search API results like OOTB Sharepoint list with filtering at least. Is it possible to use SharePoint javascript libraries to achieve this? If not, is there any jquery/...
0
votes
0answers
127 views

SharePoint hosted app submit multiple items to list

I am developing a SharePoint 2013 hosted app and I currently have a 'repeating' table that is being cloned each time a button is clicked. I currently have three tables which all submit to separate ...
0
votes
0answers
169 views

App for Office (Office Add-in) Web Page Possibilities

I am trying to develop a task pane add-in for Word. Everything online says that at a minimum, the add-in requires a web page, javascript file, and a manifest. Does the web page have to be done in ...
0
votes
1answer
287 views

Own Title on hover - load other field

I have custom list named LIST1 with fields ID,Title,ShortComment,LongComment. I'am using view webpart , where only fields ID,Title,ShortComment are visible. Is there some way to show field ...
0
votes
0answers
1k views

Using d3 in sharepoint web interface

I am building a website for a research center under my university domain. I am trying to create a data-driven document, with autoupdate based on lists. Yet since server-side access to sharepoint lists ...
0
votes
1answer
640 views

Get video item from list with Url with Javascript

right now I have the Url from a video item, that im showing in a Video native webpart, but i need to get the title and description for processing. For that, I only can use Javascript, so, I get the ...
0
votes
1answer
2k views

Hide Fields and Columns on SharePoint List form [duplicate]

I have a situation where I want to show/hide my SharePoint list column / Fields in a list form based on the value of some other field on the form. Example : I have 2 dropdowns say "IssueType", "...
0
votes
0answers
600 views

Commit using JavaScript

I 'm looking for a solution to submit an item using JavaScript for a button already placed on the form like this..... $( "#ctl00_m_g_a8a7fbc3_43a2_4418_83f6_b76759ed345a_FormControl0_V1_I1_B4").click(...
0
votes
0answers
165 views

SharePoint 2013 - Verify Active Directory security group membership in Master Page javascript

I desire to add some JavaScript that will verify the current users AD security group membership. If a member of group 'A' the logic will redirect one way. If not in group 'A', but in group 'B' the ...
0
votes
1answer
1k views

Dynamic fields in SharePoint 2013 forms

I have a custom SharePoint list form where I would like to have country names(from another list) in one row with a check box in front of each row. On checking of any check box in front of country name,...
0
votes
0answers
29 views

How to reference and dynamically display documents based off of input on a form

I'm using Sharepoint 2013. I'd like users to be able to select a series of drop down boxes of categories and have a list of documents automatically filter based off those choices. I'd also like to ...
0
votes
0answers
243 views

Select2 in Sharepoint Application Page

Have a Sharepoint application Page where I use Select2 4.0 for Searchable Dropdown List. On my development PC everythink works fine but on any Client the CSS seems to be broken (Both use IE11). On ...
0
votes
5answers
2k views

Get SharePoint Data with javascript from html file

Hi guys I want to do the following: I have written a javascript code in a .html file. From that I want to access SharePoint Data with COM. So this is my code: <html> <head> <script ...
0
votes
1answer
107 views

Show Dialog when Input value changes

I am working on a Sharepoint application Page to Uplaod a File to a document libary. The Upload can take a bit of time so I want to display the waiting for it Dialog. I check if all requiered fields ...
0
votes
3answers
650 views

Sharepoint CSS : dynamically add SharePoint:CssLink using javascript/jquery

How to add CSS Link dynamically to elements? $('head').append('<link type="text/css" rel="stylesheet" href="my css path">'); The below code doesnt work because we need to specify the url/...
0
votes
1answer
359 views

How to display Sharepoint online office 365 site in aspx page

I have created an ASP.net web application where I am trying to display a SharePoint Office 365 online site through iframe. I am getting an error XFrame cannot be set to same origin How to display ...
0
votes
1answer
305 views

REST API Search images

I'm doing a simple REST request to the SharePoint API and it seems that it doesn't retrieve images or videos, should I add something specific to the query text in order to have images and videos in my ...
0
votes
1answer
2k views

CSR Error: Cannot read property 'style' of null

Trying to color rows based off of the value of the "Status" column However I cannot get it working as it keeps giving the following errors: TypeError: Cannot read property 'style' of null ...
0
votes
1answer
1k views

how to change Sharepoint 2013 Default Sign-in Page and create Custom Page (normal.aspx) which redirects users to Http handler(test.ashx page)

Sharepoint Default Sign In page should redirect to my Custom HTTP Handler test.ashx code. I configured multiple claim authentication in sharepoint server 2013 and I need to by pass multiple ...
0
votes
1answer
1k views

Where to store publishing images

I've two site collections: an authoring like portal where authors creates the articles the intranet or publishing portal The articles will be created within a page in SharePoint in this page there ...
0
votes
1answer
357 views

Can SharePoint objects like 'SP.ClientContext' be used while developing Office 365 Mail Addin in Napa?

I am developing a Office 365 Mail Addin in Napa. I am trying to use the object of SP.ClientContext but it shows me error that SP is not defined. Office.initialize = function (reason) { $(document)...
0
votes
1answer
33 views

How to select entire texts in class span [closed]

I have an array title value with the class .block .title h2 span, I want to select entire texts in this class and check every title length. my script is x=$(".block .title h2 span").text()[i]; y=x....
0
votes
0answers
362 views

Create Web Property in Web Property Bag in SharePoint Site using REST API

I want to add one Web Property to sharepoint sub site using REST API. Is it possible or feasible using REST API?
0
votes
1answer
456 views

Add Web Part to page “automatically”-Sharepoint foundation 2013

I'm a relative Sharepoint newbie trying something that seems like it should be simple but having lots of trouble executing it. My organization does not have much more sharepoint experience than I do ...
0
votes
0answers
27 views

Error-The request xml is too complex and its depth exceeds the maximum depth 32 undefined [duplicate]

I am getting this error while running the below javascript code. <script type="text/javascript"> //var siteUrl = '/projects/SharePoint2013-Demo/TimesheetManagementSystem/'; var oList = null; ...
0
votes
1answer
229 views

Check field change in own edit form

We have a list with 3 different textfields (textfield 1, textfield 2, textfield 3) and 3 different datafields (datafield 1, datafield 2, datadiels 3). We work with a own edit-form. Now i want to add ...

1
93 94
95
96 97
103