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
1answer
22 views

Creating dynamic accordion from a custom list using jQuery and jQuery UI in SharePoint not displaying as should

I am trying to dynamically build accordion from list of items returned using JavaScript, jQuery and jQuery UI. Below is my code: <div> Search List <input type="text" ...
0
votes
0answers
13 views

JSLink: Getting item URL or identifier

I'm using a modified version of the Accordion Menu code sample (here). Inside the accordianTemplate function, I need to get the URL or some kind of identifier of the currentItem object so that I can ...
1
vote
1answer
325 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
0
votes
1answer
28 views

Script in webpart freeze the whole site

I have a JavaScript in my script editor that on page load freezes the browser . I can't use SharePoint designer to remove it because the script is in a script editor. I have tried disabling JavaScript ...
1
vote
2answers
330 views

SharePoint 2010 - Create link to document library content type

Have a document library with multiple content types, each using a template. Example, user click on 'New Document' > 'Content A' and a Excel form will open. I'm trying to create links (buttons to be ...
5
votes
2answers
1k views

sharepoint page redirection using javascript

below I have some JavaScript which listens for mouse activity and starts a timer if there is no activity and then redirects the user to another page after say 2 minutes..The problem is that if I have ...
0
votes
3answers
40 views

Get id of current inserted item by javascript

I'm currently trying to get the id of my currently iserted item. I'm making a timesheet which user is able to save and retrieve his own timesheet. The thing is that i put the ID of an item in the html ...
0
votes
1answer
24 views

Recalculate Calculated Columns with Javascript

Has anyone some sample javascript code to recalculate a calculated column in SharePoint 2013 tasks? This should work on new and edit form and also with the AllItems view. Many thanks.
1
vote
4answers
114 views

Format Date (25 Jul) using Javascript Object Model

I am using sp2013 and building display templates. I would like to build a locig in javascript object model to get a date field back and display it on a page e.g. var itemDate = $getItemValue(ctx, ...
2
votes
1answer
40 views

How to set a List's Default Content Type (order) by using Javascript?

I've spent a lot of time Googling and MSDNing on this topic and then stopped at the set_uniqueContentTypeOrder method. This method will take an array of Content Type IDs and change the "New Item" ...
0
votes
1answer
43 views

Get ContentType name with select fields

I have a problem with getting the ContentType name for a item. when i use http://sp2013dev/sites/mms/_api/web/lists/GetByTitle('List')/items(1)/?$expand=ContentType I get as response all Fields ...
0
votes
0answers
11 views

Start Workflow with Initiation Form via Ribbon

I want to start a workflow for selected items using JavaScript and a custom button on the Ribbon. I was able to get this working with the help of SPServices. In essence I needed to get the item id, ...
0
votes
0answers
9 views

Discussion Board Best Reply Clost Thread

I am creating a discussion board app and want to know if I can amend the top button that has the text "Best Reply". I want users to be able to mark the discussion as complete. I am adding a choice ...
1
vote
1answer
487 views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
0
votes
0answers
49 views

Use jQuery to make a “column” on the default view?

I am trying to append a value to the end of each row by selecting the number value in one column to do some sort of math with it and output the value on the other one. This code works for me on one ...
0
votes
1answer
329 views

List Onload event

What I want to do: I have a custom list that contains a lot of items. When an user loads the list, all items of his view should be checked. If there is a special value in the listitem a notifiaction ...
1
vote
3answers
82 views

How to get title and url using allproperties

How can I get title and url using allproperties? I can get custom proeprty but do not know how to get title and url. I am not able to know as why I get the alert twice in the following code, ...
1
vote
1answer
25 views

Reindex search results (Content Search Web Part, 2013)

I will just leave this here, since it helped us a lot: We have a Content Search Web part with custom Display Templates with link to edit item. After user edit item, we want to refresh the search ...
0
votes
2answers
51 views

How to make webEnumerator.moveNext wait until executeQueryAsync query executes

I want executeQueryAsync to complete before giving back control to webEnumerator.moveNext, anyway ? function onGetSubwebsSuccess(sender, args) { var webEnumerator = webCollection.getEnumerator(); ...
0
votes
0answers
20 views

How to change state (toggle on/off) of ToggleButton?

There is a ToggleButton: <Tab Id="Ribbon.Book" Title="Book editor" Description="" Sequence="2"> <Group Id="Ribbon.Book.TextFormatting" Description="" Title="Text ...
1
vote
2answers
31 views

SharePoint - How to get field value using JSOM + JSLink without Async call

I'm fairly new to the JavaScript Object Model (JSOM) and I want to do a simple call to get a field value. Very easy in C#, but I can't seem to get a field value even though I have the ListItem: ...
3
votes
2answers
2k views

SharePoint javascript refresh page is reloading the whole page

In a webpart, I added a button that should trigger a modal dialog, and display a message when the dialog is closed. The dialog script is handled by this code : function OpenGenericForm(formUrl, ...
1
vote
1answer
80 views

Custom Ribbon Action - Disabled with Selecting Document Set

The custom action enables/disables when a list item or folder is selected/deselected. The issue I'm running into is when a document set is selected, the custom action remains disabled. The logic: ...
0
votes
1answer
27 views

Retrieve list item information using path

Using: SharePoint 2010, JavaScript, jQuery 1.10.2, SPServices In SharePoint 2010 I have a custom (JavaScript-based) page where users may type in text and link to items in SharePoint lists. A recent ...
0
votes
0answers
13 views

calling a function from choosing a value from a drop down [closed]

I have two drop down's to choose units like inch,feet e.t.c and significant digits after decimal desired by the user for calculating the area and other properties of circle..... don't have any past ...
1
vote
1answer
652 views

_spBodyOnLoadFunctionNames not always working

This is in reference to SharePoint 2010. I am writing some custom javascript that needs to know when the page has finished loading. To accomplish this I am pushing my callback function on to the ...
3
votes
6answers
1k views

Enforce Drag and Drop documents to apply metadata

We have implemented an issue management system in SharePoint 2013 which provisions a page for every issue added to a specific list. One of the Web Parts the automatically provisioned page contains ...
0
votes
2answers
349 views

Open in a new window a document stored in SharePoint in C#

My problem is simple. From an aspx page, I need to open in a new window a document stored in Sharepoint. To access the document in SharePoint I need to provide credentials. To open the document in a ...
1
vote
1answer
514 views

Invalid field or parameter requestInfo.url

I am trying to get users blog post (newsfeed blog posts) which are located on same web application as other site collections and show them within a web part by using JavaScript. I use ...
0
votes
2answers
29 views

How to insert record to sharepoint multi choice field via CSOM

I am trying to insert a Multichoice (checkbox) field to sharepoint via the SP namespace in javascript. Updatnig single choice is simple. For Multichoice I have tried: var itemCreateInfo = new ...
0
votes
1answer
29 views

Navigating to new page loses querystring

I have a on premise sharepointed 2013 application. On the home page, there are several links to different pages within the application itself...such as <a href="User.html">User</a> ...
0
votes
0answers
33 views

SharePoint 2010 Web Part that needs to call a dll and .js files

I am trying to create a SharePoint 2010 web part. The web part I am trying to create will contain, among other things, a custom asp.net server control as a dll. The dll refers to a number of files ...
0
votes
1answer
23 views

Javascript/jQuery - check language and replace word problem

I need to replace one word in my SharePoint site, depend in on that what language is used. I found this question: Get the current UI language with ECMAScript I tried to use that code and it works ...
0
votes
0answers
11 views

Is this code looking for a cookie to remember the tab previously visited? [closed]

If it does, I would prefer it to just highlight the #tab-1 each time the page is visited. <script type="text/javascript"> $(function () { var tabContainers = $('div#tabs > ...
0
votes
1answer
54 views

Get list items created by logged in user with REST api

How can I get all list items created or changed by the currently logged in user with this function? What's the correct query? // Getting list items based on ODATA Query function getListItems(url, ...
1
vote
5answers
2k views

How do I Inherit the CSS Theme Color in my Sharepoint 2013 App?

I am building a Sharepoint 2013 App in Javascript / HTML / CSS and I want to implement / inherit the color / class / css used by the theme. How do I do this? I want to ensure consistency through ...
0
votes
1answer
332 views

How to store the value into the xslt variable returned from Javascript function?

I have created a template in ItemStyle.xsl for CQWP. I want to store the xsl variable value that is returned from javascript: My template is: <xsl:template name="DepartmentsTemplate" ...
1
vote
1answer
547 views

Getting user email from a List Item column using Javascript

I am creating a Hosted app using NAPA on Sharepoint 2013 (Office365). I need to retrive a user from a list column and get the user's email. SP.List.getItems with a query returns a listEnumerator ...
2
votes
1answer
142 views

How to add URL to list using JavaScript

I have a list with a title and a url. I'm trying to add a new url using this function function addListItem(url, listname, metadata, success, failure) { // Prepping our update var item = ...
1
vote
2answers
599 views

Question about adding javascript:OpenPopUpPage to my SharePoint sites

I have the following problems with showing javascript pop up page I have added a content editor web part inside my team site, then I insert an embedded code snippet with the following code:- <a ...
0
votes
0answers
16 views

How to interact with a SharePoint 2013 page in edit mode

I'm new to the SharePoint 2013 Javascript API, so I'm still bumbling in the dark, trying to figure out how to write some javascript code to interact with a Sharepoint 2013 page in Edit Mode. ...
0
votes
1answer
703 views

Upload a document in a specific folder

I would like to set a specific folder when I open the upload.aspx page to help. I tryed to look in the dll but the license of reflector is expired. UPDATED Maybe this post can help ...
0
votes
2answers
63 views

ExecuteOrDelayUntillScriptLoaded(codetorun,SP.js) for entire script function

If you look at below code, I have used executeordelayuntillscriptloaded at start of my script so that it will run only after that file is loaded. But this breaks some functionality. Can you check this ...
0
votes
0answers
10 views

Fix Required Field Titles broken by December 2013 CU [duplicate]

So I deployed SP2010 SP2 A couple of weeks ago to fix the XSLT Compile Time-outs that were introduced in SP2010 SP1. Things seemed fine but then we noticed our automatically started Workflows on ...
0
votes
1answer
40 views

Javascript on masterpage returns undefined

_spBodyOnLoadFunctionNames.push("FetchURL"); function FetchURL() { // Custom JavaScript methods var ctx = new SP.ClientContext(); ...
0
votes
1answer
40 views

Get Context through REST call

I know that in SharePoint 2013 with JavaScript, you can load the current context like so... var context = SP.ClientContext.get_current(); var user = context.get_web().get_currentUser(); ...
0
votes
1answer
40 views

Sharepoint Hosted Permission (SP 2013)

I am developing a test REST app currently, the app is sharepoint hosted and is being developed and deployed to the SP site without Sharepoint installed on my Machine. The app is meant to take in a ...
5
votes
7answers
4k views

What is the proper way to add jQuery to a MasterPage?

Currently I am using this method in the header: <script src="/_layouts/MNCAssets/scripts/jquery-1.5.1.min.js"></script> But for some reason, my webparts that use jQuery don't appear to ...
1
vote
1answer
41 views

Sharepoint 2013 delete AttachmentFiles by JS

how can I delete an AttachmentFiles of a list item by Javascript? (with REST or using SP.RequestExecutor) Thank,Nk
1
vote
1answer
76 views

Retrieving list items using Javascript and Caml query

Hi guys I'm new to SharePoint dev and working on a project to retrieve list items. I have followed the instructions from http://msdn.microsoft.com/en-us/library/office/ee539350(v=office.14).aspx and ...