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)

0
votes
2answers
595 views

How to cast a date column value in JSLink javascript, and how to increase this date variable?

I am using sharepoint 2013 online. I have created a custom list. On this list I have used JSLink to show an icon in a column. I would like to do some logic to show a red or a green icon. I have now in ...
0
votes
0answers
136 views

How to copy document from library to list attachment with SP Services?

I need to attach a document that is stored inside a document library to a list item on the same webpage. All needs to be done with javascript / jquery / spservices. Can you please help me and show ...
2
votes
1answer
186 views

How to convert date based on current users, using client side code

I have a date that I want to display to the user, and the format should be dynamic and based on the user. If I do this I get a format that doesn't fit every user. var prettyDate = ...
0
votes
2answers
2k views

Uncaught TypeError: Cannot read property 'get_current' of undefined

this one is weird I hope somebody can help me. I created a custom action for a callout on a document library. I added the javascript code in a code snippet webpart on top of the document library ...
1
vote
1answer
204 views

Can't add item to list in SharePoint Online app

This is an extension of my previous question... it was resolved but a new issue has come up after getting past that. Here's the code I'm currently using: var clientContext = new ...
0
votes
1answer
54 views

want to place my button image to specific place in DispForm ribbon by using sequence number?

Currently Im working on sharepoint designer 2010 DidpForm.aspx page. By using this I have placed one delete button(red colored image shown below) logo on ribbon. I given sequence no 11 so it is ...
1
vote
2answers
1k views

How to get listitem id by using javascript?

I tried so many ways to get list item id but could not. Ofcourse i got one solution but it is not much proper solution. Can anyone give smart solution to get list item id by using js. I'm using sp ...
3
votes
1answer
91 views

Error calling REST API in Firefox

I am using Rest API for Follow Functionality. My JS is working fine on IE but it doesn't work on Firefox(neither it goes under success call function neither under error. Is anyone having any idea ...
2
votes
1answer
376 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
577 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
123 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
132 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
737 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
903 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
419 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
325 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
350 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
116 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
172 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
42 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
273 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
153 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
111 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
88 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
77 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
289 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
109 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
898 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
576 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
44 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
62 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
403 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
729 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
91 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
974 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
249 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
460 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
80 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
26 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
315 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
336 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
779 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
58 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
692 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
63 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
172 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
620 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
50 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() { ...