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)

3
votes
2answers
2k views

Page.ClientScript.RegisterClientScriptInclude in Sandbox?

I'm trying to use jQuery in a Sandboxed Visual WebPart (2010): protected void Page_Load(object sender, EventArgs e) { string jQuerySrc = Page.ClientScript.GetWebResourceUrl(this.GetType(), ...
3
votes
4answers
7k views

Loading jQuery in the Correct order

I wish to use a jQuery plugin in SharePoint. Currentley I have jQuery added to each page via a custom master page. <script src="/Style Library/js/jquery-1.6.4.min.js" ...
3
votes
2answers
387 views

Can all the /_layouts/xxx.debug.js files not be served to end users?

I'm working with a 3rd party vendor who has done the SP 2010 integration of a small site. I've noticed that our incredibly simple login page is nearly 3.2 megabytes. The users of this site are the ...
3
votes
2answers
45 views

Site Columns JSLink doesn't work in custom XSLTListViewWebPart

I have a site column (Status) that I've added JSLink to, that runs my custom JavaScript. This works fine on lists. The JavaScript changes the text to a colored image. I've then created a Visual Web ...
3
votes
1answer
41 views

Optimizing taxonomyTerm request

I'm working on a custom navigation webpart for SP2013 using the JSOM. Currently, a part of fetching the data from the termstore involves fetching all the terms and then getting data from the ...
3
votes
1answer
98 views

Retrieve subsites from site collection sort last modified date using CSOM

I want to retrieve subsites from current site collection. And it should be order by last item modified date. I am able to retrieve subsites by following code : channel_context = ...
3
votes
1answer
76 views

Can I immediately call a function when selecting data in a SharePoint 2010 choice field?

I am trying to show/hide other fields depending on the choice selected from a specific choice field in my SharePoint form (NOT InfoPath). I can get it to work using "onfocusout" but that does not work ...
3
votes
2answers
96 views

XsltListViewWebPart and custom link column

I have a XsltListViewWebPart with a custom link column used for change a value on current listitem using JavaScript. <a href="javascript:ApproveRejectRDA('{@ID}', true);" title="approve"> ...
3
votes
1answer
702 views

Create a document set with JSOM

I'm trying to generate document sets on the fly with the following code. It is using /_layouts/15/SP.DocumentManagement.js for the SP.DocumentSet.DocumentSet.create method which takes four parameters. ...
3
votes
1answer
2k views

JSOM - get listitem by file URL

Task Abridgment - Access item attribute from a picture library by picture url. Long - When editing a pagelayout and an image is added to the page, the image's description should be loaded. This is ...
3
votes
1answer
941 views

How can you get a user's mysite image url based on a list's AuthorId?

I have a list that I am using SharePoint 2013's rest API to grab info from. I would like to display an image of the user who created the list. This site shows how to get a user's image url based on ...
3
votes
1answer
4k views

SP2010 Javascript REST API: updating list item using MERGE and POST

I am trying to use REST API approach in javascript to update a sharepoint list item where I have an id. So I use GET and POST to create records, but per MSDN article it looks like the way to do this ...
3
votes
2answers
2k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
3
votes
2answers
3k views

SharePoint 2013 lazy load for .click() issue

With IE 10 and Chrome 26 on Win7 x64 (Host1) no issues are appearing, except Firefox 20. With IE IE 8 on Win7 x64 (Host2) and IE 10 on Windows Server 2012 x64 (Host3), there is the following issue I ...
3
votes
3answers
3k views

JavaScript and CSOM Unable to update a new item lookup field with a string

I have a list MyUsers that has a lookup field deptRef that references the Title in my departments list. Fine and is easy for my users to update the MyUsers list and select the relevant department. ...
3
votes
1answer
1k views

Best way to access SharePoint (online) from a Windows 8 RT/Metro application?

I am developing a Windows 8 tile app/Metro (Windows RT) application. I have experienced some problems linking with the C# client object model assemblies due to limitations in RT. I was hoping I ...
3
votes
3answers
2k views

ECMA script - retrieving SPList property bag

I have added a property bag to SPList. Since the SPList doesn't support property bag, I have added my custom property to SPList.RootFolder.Properties. I would like to retrieve this property using ECMA ...
3
votes
2answers
805 views

Client Object Model equivalent of SPWeb.SiteLogoUrl

I can get the name, url and description of a site using SP.Web but there is no logo property. Is there a javascript COM equivalent to ...
3
votes
2answers
763 views

SharePoint webpart and application page

I need to make an application page or a webpart that have a javascript code and i tried to add the jquery i a new project to upload it to the SharePoint but the code didn't work this is the code that ...
3
votes
3answers
533 views

jquery projects and visual studio best practices?

Just curious how others are handling their jquery related solutions. It's obviously very easy to add a Content Editor web part with a content link to a source file. That file could have your ...
3
votes
1answer
638 views

What are CUI.debug.js files and why are they needed?

Our server has had some issues lately and we've been keeping our eye on the processes running. One process taking up a lot of memory is using CUI.debug.js. I'm assuming it's used for debugging? What ...
3
votes
2answers
1k views

Stop deletes via EditForm.aspx using SP.UI.ModalDialog.showModalDialog going to List view page

If you use SP.UI.ModalDialog.showModalDialog to show a Lists standard EditForm.aspx the callback (dialogReturnCallback) is hit for cancels and edits but not deletes which are instead redirected to the ...
3
votes
1answer
2k views

Getting date and time from SharePoint Server 2007 and throw it to Javascript variable

How to I get the date and time from SharePoint Server 2007 and pass this value as a Javascript variable?
3
votes
2answers
1k views

Web Service UpdateListItems User Permissions

I'm trying to do an AJAX SOAP call to the Lists web service, specifically UpdateListItems. The query isn't malformed, and is working appropriately when using a user with full permissions. When a ...
3
votes
3answers
424 views

SharePoint 2013 List View Accordion Render

We're looking to implement a Q&A section on one of our SharePoint sites. To make interaction easier on end users I've been looking for a way display list content differently. I stumbled upon an ...
3
votes
2answers
277 views

Sharepoint Deployment not updating webparts

Alright. I have just made changes to a custom webpart that was already deployed to Sharepoint. I made a few deploys, some changes... and suddenly, a code that was in the front-end of the webpart ...
3
votes
1answer
113 views

Click anywhere in data view group by for expand/collapse

I'm trying to get the functionality of being able to click anywhere in the group by header element to expand and collapse the group. I have gotten close where I can click anywhere in the element ...
3
votes
1answer
726 views

JSLink and Javascript Events

I have customized the view for my SharePoint 2013 List using a JSLink file but have not been able to get the buttons I added to the page to respond properly. They cannot find any DOM elements when the ...
3
votes
1answer
522 views

Get distinct values via mechanism used when clicking “Show Filter Choices” on a Sharepoint list using Javascript

As many other people on this site seem to need, I'd like to get an array (or equivalent) of the distinct values in a field for a list. The canonical way of doing this is to retrieve the entire field ...
3
votes
1answer
1k views

SharePoint 2013: Check Workflow status programmatically (javascript)?

I need to be able to get the status of a SharePoint workflow 2013 using javascript. My goal is to start in a loop for all selected items synchronously a workflow. For that I will check if the started ...
3
votes
2answers
2k views

Add Users with Javascript after Client PeoplePicker is loaded

the following MSDN article describes how to use the Client PeoplePicker with Javascript: http://msdn.microsoft.com/de-de/library/office/jj713593(v=office.15).aspx I have an SharePoint hosted app ...
3
votes
2answers
268 views

launch ribbon action with ribbon hidden

I didn't find anything to help me out, so I'm asking your help. I work with sharepoint 2010. I have a team Site where the ribbon is hidden. (never trust users, thay are evil :p ) On this team site I ...
3
votes
1answer
301 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 ...
3
votes
1answer
3k views

How to get file or list item icon in SharePoint 2013 using javascript

My requirement is i have to display files from document library with images using javascript object model or spservices. pls let me now is there a way.
3
votes
1answer
242 views

Add content to the editor

I've developed a ribbon button to Sharepoint inside Media tab. This opens a dialog where I list loads of content. On click I'm calling a function to close the dialog and it is supposed to insert some ...
3
votes
1answer
313 views

Get Site Template ECMAScript

I have an ECMA script that I'm using to build a site directory (Thank you Bill Simser). I'm trying to add additional information such as the template the site is using, and not having much luck ...
3
votes
1answer
8k views

How to retrieve all items from a list (with custom fields) by javascript object model

I need to get all my custom fields from my list by Javascript Object Model.. The code I wrote down is this: var items; $(document).ready(function () { ...
3
votes
1answer
2k views

Can I Access the SPAuditQuery from the JavaScript Class Library?

Or there's a SP2010 Built-in service to access Audit data? [UPDATE] Quick awnser, No, there's no way to access the SPAuditQuery from the SP JavaScript Class Library. At the end I end up using a WCF ...
3
votes
6answers
11k views

SP.UI.ModalDialog.RefreshPage from the dialog itself?

I have customized the display form on one of my list. On a webpart page, I have drop a view to this list. When I click on the title of my item, the custom disp form is shown as expected in a modal ...
3
votes
2answers
2k views

Multiple SharePoint 2010 modal-dialogs

Is it possible to show multiple modal-dialogs above each other? It should work like this: 1) User clicks link that opens first modal dialog 2) in first modal dialog, user clicks another link that ...
3
votes
3answers
5k views

Expanding and collapsing sharepoint webparts

I want to implement a collapsing/expanding feature to all my webparts in a certain page and tried the code shown here: http://moblog.bradleyit.com/2009/08/sharepoint-expand-or-collapse-web-parts.html ...
3
votes
3answers
4k views

Javascript to get GUID from SharePoint

I am newbie to SharePoint and I am uploading a file to the server using javascript. Now the task is to get the GUID of that file and display it ({alert(guid); is fine). I don't even know where to ...
3
votes
2answers
804 views

SharePoint 2010 Save ListItem without closing

Is it possible to save a ListItem without closing the modal dialog in SharePoint 2010? Possibly by replacing the save button on the Ribbon with a custom button that calls the submit function and keeps ...
3
votes
1answer
570 views

Can I use JavaScript in 'Edit in DataSheet' mode?

I would like to use some JavaScript in 'Edit in DataSheet' mode to check a value and prompt a user to enter some text. Is this possible?
3
votes
1answer
50 views

HTML5/JavaScript Form with Complex Field Types

I am developing a responsive Website on top of SharePoint using Angular and have a few list forms that I need to establish. For fields such as text and date via saving or updating against the REST ...
3
votes
2answers
109 views

Have javascript only run once at installation

I have a Sharepoint Hosted app in which I have some javascript (permission related) that only should run once. It should run only when the app is trusted by the admin that installs the app and when ...
3
votes
2answers
868 views

Access an item in a list in a subsite with Javascript(Solved)

function Testing() { var context = new SP.ClientContext('/Testing'); documents = context.get_web().get_lists().getByTitle("Site Assets").getItems(); context.load(documents); ...
3
votes
2answers
2k views

How to get ClientPeoplePicker value using javascript

can anyone please tell me, How to get ClientPeoplePicker value using javascript.?
3
votes
1answer
94 views

Script editor webpart ribbon problems

I added a script editor web part (javascript code) to a view page (/Forms/AllItems.aspx). After that I can not see anymore the File and List category in the ribbon bar. I read somewhere that ...
3
votes
1answer
759 views

Suspend and resume SharePoint Online workflow using CSOM - Ecmascript

I have a requirement where the Master user has power to interrupt any workflow and put it on hold and the approvals should be stopped on that workflow until the Master user resumes the workflow. When ...