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)

2
votes
1answer
484 views

Create Multiple List Items with One Function

Is it possible to create multiple list items with one function in JavaScript / ECMAScript? I know that a single item can be created with the code below, but would like to know if it is possible to ...
1
vote
3answers
810 views

Adding an item to a list using javascript — oListItem is undefined.

I'm using the code from this MSDN guide: http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx Here's what it looks like: var clientContext = new ...
0
votes
1answer
136 views

How to create new subsite while adding new item to the list by using javascript?

Scenario: While adding item to the list, a new subsite will be created with list item title and description by using javascript. Currently I'm working on NewForm.aspx page. I have added button(not in ...
0
votes
2answers
150 views

how can we refesh list items after updating in dispForm?

By clicking button in DispForm window I wrote some script for updating some list items. Here im facing two issues . One is , items are not updated until refreshing list page. second is, DispForm ...
1
vote
2answers
1k views

How to get list name through javascript?

I wrote javascript for getting list items but here I'm hard coded list name as "Projects"(my list name). How can I get list name automatically with out hard coding, function DoLogicalDelete() { ...
3
votes
1answer
1k views

Help with getting the value of a look up field

Currently, I am using an ajax request to access the list items. The fields that are not lookups come as expected but the lookup fields come across as an ID of the object that corresponds to its ...
1
vote
1answer
516 views

Promoted Links with different sizes in same Page

I have a complicated requirement in which I have to embed a promoted link with different sizes and styles in the same SharePoint page. Figure at the bottom illustrates what I am trying to achieve. ...
3
votes
1answer
441 views

SharePoint 2013 Calendar Reservation

My company moves to Sharepoint 2013 and wants to have a reservation calendar. But the feature called resource reservation not enable in 2013, just in 2010 based on 'Group Work Site'. I can make it ...
1
vote
2answers
474 views

Execute JavaScript through a workflow? [closed]

I have a workflow that runs whenever a new item is created in a list, and I want the workflow to execute a piece of JavaScript code. So far I haven't found a way to call a function through a workflow, ...
2
votes
0answers
125 views

SharePoint Edit Mode Javascript error in edit mode

I am not able to edit the page from the browser. I used to change and edit webparts when suddenly in the edit mode everything looks like it is locked/stalled. When I open the debugger tool, I saw a ...
3
votes
1answer
201 views

JavaScript Validation in ECB for out-of-the-box menu items

Is it possible to add some kind of JavaScript validation to ECB items like Edit Item, Check Out and Workflows? What I want is a simple JavaScript alert and redirect to the list if the clicked item ...
2
votes
1answer
51 views

Projectserver loading resources

The problem is that I can't get my resources out of the ProjectContext. I can get the project names but then something goes wrong and i get this warning: Error: The collection has not been ...
1
vote
1answer
392 views

Search Api, filter by parameter

I'm using the Search Api to get the last modified documents by the person using the search. My search string is looking like that: https://www.intranet.i/site/_api/search/query?querytext='* ...
2
votes
1answer
163 views

how to hide a multi select lookup column based on a drop down value

With the following code I am able to hide a normal lookup column based on drop down, But multi select I am not being able to In multi select the identifier is SelectCanditate;SelectResult Should I ...
1
vote
1answer
131 views

Can't sync SIP Address, can't query it in search even when added manually

Issue 1 I'm trying to pull back a user's SIP address using the search service. I have this manually entered for the time being in a particular profile. My query: $.ajax({ url: ...
1
vote
1answer
114 views

How do I stop jQuery from injecting junk attributes into my HTML

I have an HTML unordered list in a Content Editor web part that I'm formatting as tabs where each has an onclick event to show/hide some other data. The issue is that I'm getting all these weirdo ...
1
vote
0answers
82 views

Error from script tag for sp.runtime.js

I'm working to set-up the PreSaveItem() on an edit form for a list such that it evaluates parameters from the query string, and some list fields to execute workflows based on various criteria. Based ...
1
vote
2answers
315 views

Auto populating a text box based on listbox selected value and drop down value javascript sharepoint

I have a list named "Assigning to Individual" which has a drop down 'Initial Training' The values in the drop down are Immediate, Hire Date, Specific. There is another textbox Date There is a ...
0
votes
0answers
123 views

Cookie blank in Safari and iOS

I have a modal dialog that launches when a user first visits the site. The user selects a particular item, in the form of a radio button, and then a database query is made and the resultant ...
3
votes
3answers
1k views

how to determine if a page is checked out? Client side, using javascript?

I need a way to determine if a publishing page is checked out by the current user; I need this because I'd like to put a redirect, if the page is not checked out. Any ideas?
4
votes
3answers
749 views

SharePoint REST API call with more than 500 rows

I have an AJAX call querying the SharePoint REST API which will return more than 500 rows: $.ajax( { url: _spPageContextInfo.webAbsoluteUrl + ...
0
votes
1answer
55 views

Error when i parse string object to json object [closed]

Hi I'm trying to parse my string to a json object, it wont work, I get a error when I debug the code, Syntax error, here is my variable I want to parse, var myyVar = "{title: 'myTitle',root: ...
2
votes
1answer
70 views

SharePoint 2010: Create a compilation email from multiple items

First of all, the tools I have available to me are SharePoint Designer and InfoPath, and I am much more comfortable in the former than the latter. I have a request to create a solution to facilitate ...
1
vote
1answer
492 views

ECMAScript moveTo move document to another web in same site

I have studied and used the following post to attempt to move a document: moveTo and moving documents from one library to another This works perfectly when moving documents to different libraries in ...
2
votes
1answer
839 views

Using javascript/jquery to modify the display form?

I have a js file which retrieves a value stored in a date field and then calculates the remaining time in weeks/days. My issue is that this works on the edit form because I send the value in with ...
0
votes
1answer
107 views

ECMAscript - grab field value from specific id number

I'm trying to grab the value from field1 with a specific id number, do a mathematical computation and update the same id number with the new value and update field1. I'm unsure on how to grab the ...
0
votes
2answers
1k views

How to deploy a custom JavaScript file to Style Library from SharePoint Apps?

I want to do some java-script operation on a custom list in SharePoint 2013 Online version. So I am creating a separate java-script file and deploying to Style Library manually. Does anybody know how ...
0
votes
0answers
17 views

SharePoint 2013 - disposing SP.ClientContext in JavaScript [duplicate]

I'm little bit confused about JS's COM in SharePoint 2013 and disposing ClientContext object. As far as I can see from earlier versions of SP (2010 mainly) you had to dispose ClientContext and ...
2
votes
1answer
259 views

How to Pass parameters from Javascript Client Object Model to Report Viewer Web Part?

I have some SQL Server Reporting Services (SSRS) reports that take parameters. I am displaying these reports via the SSRS Report Viewer Web part on a site page. I have the parameters that are needed ...
0
votes
1answer
572 views

Using a redirect URL parameter in WebForm_PostBackOptions

I have a custom list form in SharePoint Online 2013 which after validating using the PreSave() function displays a modal dialog giving the user a choice of two outcomes. This works fine and the user ...
0
votes
1answer
84 views

Querying SharePoint search for all departments with REST API

I currently have an ajax request set up in my javascript to call the search API but this only gives me departments matching whatever I input for query: $.ajax( { url: ...
0
votes
0answers
27 views

How to access another web, by name in client object model

Iam in site B . There is another site named A .I want to access a list A of site A from site B using client object model. Can I access it I am using below code. var context = new ...
0
votes
1answer
2k views

How to get the managed metadata column value in a list client object model

I am trying to get values from a list for different columns like Title ,ID ,Region Where Region is a metadata column . I am able to get all the values except metadata column values . Pleas tell me ...
1
vote
2answers
404 views

How i can change the color font to red in a drop down feild inside sharepoint

I have an issue that i need to change the font color to be red when we edit the Project task list in my drop down Task Status feild when the Task status is Late > color in red and we choose another ...
0
votes
3answers
395 views

jQuery globalization in SharePoint 2010

jQuery UI and validation are strongly dependent upon regional settings. Consider for example a date validation or a number validation, it cannot work irrespective of the current locale. For this ...
0
votes
1answer
908 views

Add new item to child list and refresh the parent form - multiple lookup

I've created a parent list (Vendors) and a child list (software list). There can be multiple vendors for one piece of software. I've created a custom new form with a link which opens up a modal to add ...
1
vote
1answer
67 views

Page with discussion board does not refresh after creating a new discussion within a modal dialog

I'm using the following code to allow users to create a new discussion topic in a modal dialog, rather than on a new page: // When called, this function opens the dialog. function openDialog(pUrl) { ...
1
vote
3answers
755 views

Get value of lookup field

I have a cascading lookup using two lists on my SharePoint 2010 site. I want to get the value of first selection made in the lookup and show/hide other fields on my custom form based on that first ...
0
votes
1answer
66 views

Run script on quicklinks on every page

On our sharepoint there is a serverside issue that morphes links into invalid values. I am able to correct that error clientside using javascript and ive been able to do so on the main page ...
2
votes
2answers
194 views

SP Changes Code in HTML Source Edit upon save

In a sub-site, I input HTML through the WI using the HTML Source edit button in the ribbon. This is what I enter: <a onclick="javascript:NewItem2(event, ...
1
vote
1answer
781 views

Not able to fetch Term store and related terms using client object model

I want to fetch termstore, Termsets and related terms.However, Iam not even able to fetch the termstore. Below is the error message. TypeError: termStores is undefined termStoresEnum = ...
0
votes
1answer
61 views

Error when calling isFollow() method. Error is “Invalid Pointer”

I am getting issue while fetching follow information for a site. I am getting error when calling isFollow() method. Error is "Invalid Pointer". below is my code function isAlreadyFollowed() { ...
0
votes
1answer
37 views

Using Pop-Up New Item Input of List from main site in sub-sites

I can use the following JS code on my main site to create an image link to pull up an input page just like when you click on the "+ Add new item" at the bottom of a list: <a ...
2
votes
2answers
334 views

SharePoint 2013 Organization Chart [closed]

im in need of help here. I have to render this code from a sharepoint list instead of this json string. How can i do that? Heres the link to the chart: http://librerias.logicas.org/lib_gg_orgchart. ...
1
vote
1answer
348 views

Get SharePoint logged username from page displayed at WebPart

I have a webpage hosted in my local server being displayed inside a Page Viewer Web Part in SharePoint 2007. I would like to include a user check inside the pages in my server, so when an user tried ...
1
vote
1answer
194 views

SharePoint.Backbone Undefined Source — JSON returns Empty

I am working in SharePoint 2013 Foundation and I have a custom list named Properties that I am trying to use in a Backbone Application. The list contains all 90 of our properties and each property's ...
3
votes
3answers
2k views

How to find the current folder through JS COM?

Is there a way to get a reference to the current folder through the JS COM? It doesn't seem as though it can be done with SP.ListOperation. And by current folder, I mean the folder the user is ...
0
votes
1answer
110 views

windows.setTimeout() making my infopath form very slow

this is my code for InfoPath postback window.onload = function() { window.setTimeout(getData, 1000); } function getData(){ getEmployee(); getCompany(); window.setTimeout(getData, 1000); //To ...
4
votes
3answers
1k views

Check an Admin account only using Javascript?

Could anyone suggest a way to use Javascript to check whether or not the logged in user to a SharePoint site is Admin? We need to hide some of the SharePoint's MasterPage ContentPlaceHolders if the ...
0
votes
1answer
703 views

SharePoint 2013. JSLink (CSR) for field Type=“User” on EditForm

How to create custorm render for field type="User" on EditForm? I need to replace standart peoplePicker control with my custom render. Code below work without exeptions, but don't set 'Sponsor' ...