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

Compressing or stop rendering of JS files from SharePoint on mobile devices

I have costumer who is complaining about massive data traffic on their mobile devices when they enter their website from their cellphones or tablets. When we made the site in the beginning, we made ...
3
votes
2answers
2k views

Programmatically add Event to Sharepoint Calendar using Client OM

I need to programmatically add events to a SharePoint Calendar and make them repeatable using JavaScript Client Object Model (without any c# code). Does anybody have ideas how can I implement this ...
3
votes
1answer
1k views

REST API + Expand Recurring Calendar Events?

Is there a way using the REST API (through javascript) to expand recurring calendar items? Or is there a helpful client side utility to assist with this?
3
votes
2answers
807 views

Sharepoint 2010 MdalDialog title [duplicate]

Possible Duplicate: Sharepoint 2010 ModalDialog title Hi, I am creating a popup window in sharepoint using this code in javascript. function openAutoResizableDialog(title, url, ...
3
votes
1answer
179 views

Getting the path of a an item on using UrlAction and JavaScript

I have a custom ECB menu item. I want to get the path of the file that has been right clicked and alert it using JavaScript. Is this possible?
3
votes
1answer
22 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
0answers
36 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 ...
3
votes
1answer
89 views

Using SharePoint 2013 Cross-Domain Library in a simple web page: is it possible?

I have a web page hosted on a server, say at http://SVR1/path/index.html, and I would like to access some list items in a on-premises SharePoint site hosted on another server, say at ...
3
votes
1answer
144 views

Check if logged in user is member of AD group with ECMA script SharePoint 2013

There is active directory group added to SharePoint group. How would we can check that the logged in user is member of that active directory group using ECMA script?
3
votes
1answer
196 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 ...
3
votes
0answers
115 views

Is it possible to retrive CRM online data from SharePoint Online using javascript? [closed]

So I would like to get data from Microsoft Dynamics CRM 2013 Online into my SharePoint Online SharePoint Hosted App. Is this possible to javascript only? Can I use the same Cross Origin Query ...
3
votes
0answers
172 views

Gantt View and Javascript Events [closed]

I'm displaying a Gantt view in a page in like this: <Module Name="DefaultBlank" Url="" Path=""> <File Path="EmployeeWorkspacePages\default.aspx" Url="default.aspx" > ...
3
votes
1answer
235 views

Retrieve property bag for sub sites using JSOM

I need to go through all sites belonging a site collection to validate a property bag of them. following is my code. the problem is the second call to get the property uses only one of the sites. I ...
3
votes
0answers
335 views

Bug: JSLink on field/column breaks callout menu in Chrome, Firefox [closed]

I am trying to use JSLink+JavaScript to customize the rendering of a field. My very simple JavaScript code looks like this: ;(function () { 'use strict'; console.log('EmployeeFieldCSR ...
3
votes
1answer
2k views

Getting Version History and What Field has Changed

I am using the GetVersionCollection to get the history information from my list. This seems to be working fine; however, what I need to do is get the version history of the individual item which has ...
3
votes
0answers
217 views

Alternative to hook into RTE javascript [closed]

I'm looking to add some logic when a HTML element (input, button, .. but no regular text) is clicked inside the RTE control on a publishing page. One of the solutions I've been thinking about is ...
3
votes
2answers
1k views

How can I implement SharePoint JSGrid filtering and grouping functionality?

I am working on SharePoint JSGrid. I am able to implement the sort functionality in JSGrid. Now I want to implement the grouping and filtering in my custom JSGrid. For filtering we have to attached ...
2
votes
4answers
11k views

Using Javascript in SharePoint

I have a number of projects that could benefit from JavaScript. I've seen a lot of "Oh, you can use JavaScript for that!", but little detail about how and where that's done. Does the script live on a ...
2
votes
2answers
211 views

Why does “sp.js” load only when I am editing a web part page?

I have created a page and would like to use some functions that require sp.js to be loaded, but it never seems to load unless I am editid the page (Site Actions -> Edit Page). Trying to find the ...
2
votes
4answers
5k views

Hide ribbon for Visitors - Using Javascript

I need to hide the ribbon for all visitors. I have seen solutions that require editing of master pages. This requirement is for one site only. I do not want to make this change for all the sites ...
2
votes
2answers
2k views

Why is this CAML Query returning all items regardless of the <Where> element definition?

I'm trying to retrieve a list of items where a specific field matches a specific value. There is likely going to be multiple items returned when the query is successful. Here's what my CAML query ...
2
votes
3answers
668 views

Can a web part prevent master page jQuery from executing properly?

I'm including jQuery and a custom .js file into the master page of my SharePoint 2010 site. In the $(document).ready() function, I'm setting a live event handler on an element in the header of the ...
2
votes
1answer
391 views

Can we access list from other site collection sites using javascript object model?

ECMAScript object model can only be used in SharePoint sites. So you can’t use this object model in an asp.net site to access SharePoint resources deployed in another url as this is cross-site ...
2
votes
4answers
952 views

How to retrieve data from one executeQueryAsync and use it in another executeQueryAsync within the same ClientContext

I want to add item to list where Title is equal to current user ID by JavaScript Object Model. As far as I know I first need to get currentUserID and I wrote the following code currentUser = ...
2
votes
3answers
2k views

How to get value of List Filter web part in Javascript?

I use the SharePoint List Filter web part on a page to control several Data View Web Parts. How do I read the current value of the List Filter in Javascript?
2
votes
4answers
3k views

Is there ways to get current item Id in Edit form

I open list item for editing and want to execute some javascript for this but i cann't retrieve item Id in Edit form. I use following code: var context = SP.ClientContext.get_current(); var items = ...
2
votes
3answers
4k views

Why does jquery's document.ready not fire?

In my master page, I have attached jQuery along with my own custom.js. I use the javascript in that file to run fixes on my pages such as style adjustments. Now, when I run simple functions on my ...
2
votes
3answers
895 views

Where do you deploy scripts that are loaded in a masterpage?

Do you deploy the script files to "_layouts" or the content database? If "_layouts," do you use a <ScriptLink> tag or a <script> tag?
2
votes
2answers
198 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: ...
2
votes
2answers
92 views

Can you set a JavaScript to execute periodically?

Relatively new to SP, and can't seem to find anything definitive on whether a JavaScript function can be set to execute daily, or at some other period. Currently have a utility function page with ...
2
votes
1answer
151 views

What is the id of the close button on a modal dialog?

I have a modal dialog and I want to change some of its properties through javascript. I have found the jquery code jQuery("a[id^='DlgClose']") but when I try to use the javascript ...
2
votes
2answers
3k views

access additional lookup fields using JavaScript and CSOM

In visual studio I have added lookup field (SubMenuItemIdRefTitle) to list definition listA that references ListB. I have also added <ViewFields> <FieldRef ...
2
votes
1answer
701 views

Inject Script Block after SP.js loads

I have a giant script block inside my code file and I want to load it after SP.js loads. I've looked at ScriptLink, but I don't think ScriptLink injects code, it only injects code files. Is there a ...
2
votes
1answer
6k views

How can I pass a Parameter via Query String to populate a lookup field on a New Item Form/DVWP?

I have two lists: List A: Products List B: Requirements I'd like to have a nice Create Requirement page launched from the Product Listing page. I have a DVWP/Multi-Item View displaying all ...
2
votes
2answers
4k views

How do I get the number of items in a list?

I have a list with a lot of items in it I need to know the list item count the following is my code: var sListId = SP.ListOperation.Selection.getSelectedList(); var oWeb = ...
2
votes
3answers
5k views

How to get list by url using client object model?

Is it possible to get list by url using ECMA script client model? For example something like this: context.get_web().get_lists().getByUrl("Lists/MyList");
2
votes
4answers
596 views

How to write javascript for Yes No modalDialog Box?

how can we write javascript for sharepoint2010 confirmation ModalDialog popup with Yes NO buttons? Thank you. I wrote like this.. but which is not working.. please anybody help. function ...
2
votes
2answers
138 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, ...
2
votes
3answers
1k views

Get file names in sharepoint 2013 document library

What is the best way to get a list of all the file names in a sharepoint document library with javascript?
2
votes
2answers
2k views

Adding notification from server side, code ignoring ExecuteOrDelayUntilScriptLoaded

I'm trying to add a UI notification from server side. To do this, I've written this code in one of my code behind event handler: private void AddNotifySuccessScript() { var ...
2
votes
1answer
627 views

How can I get specific SharePoint site GUID using javascript/jquery

For example: I have a site under this url: http://intranet.contoso.com/news When I open it i would like to read it's GUID for future use in my custom AssetPortalBrowser.aspx url picker. Thanks!
2
votes
1answer
196 views

Why Isn't the Client Object Model as Vulnerable as I Think?

I can use any sort of console in Firebug, Developer Tools, etc. to access any Javascript included in a page and make calls to Javascript functions without a problem. If, on a SharePoint page, I use ...
2
votes
3answers
821 views

Expected ; on javascript

I got the following code in my elements.xml, but I cant find the error. My ribbon is broken, the error says, expected;. But I see no error, yet, maybe fresh eyes can see it. See the EnabledScript ...
2
votes
3answers
3k views

Set SP.UI.Status or SP.UI.Notify at PostBack

I use in my web part a Session[""] and would like to notify the user when the session is expired. I check at the PostBack event if the session is already okay, if not, I will execute a JS function ...
2
votes
2answers
72 views

Copying files AND folders via REST/Javascript

I'm trying to build a the following functionality into a library view: Each document has a checkbox beside it User checks off which documents/folders they want to copy User clicks a "Copy Files" ...
2
votes
3answers
56 views

Use list or doclib?

I've got a list with a few thousands items. (It is a list of users that have completed some course.) Sometimes a user would like to have a course diploma printed. How could we achieve this? ...
2
votes
3answers
301 views

Removing top links from Sharepoint online team site

The whole day yesterday I have been trying to follow the instructions from MSDN to hide the top links in a SharePoint team site (SharePoint Online in Office 365). However, I can not get it to work. ...
2
votes
1answer
327 views

Refresh page or call JS function after New Item dialog closes

I have a link when clicked, shows the New Item dialog. When the user clicks 'Save', the list item is added. Is there a way to attach the dialog's onClose event to another piece of code? Or can I ...
2
votes
1answer
181 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 = ...
2
votes
3answers
165 views

Error when deploying SharePoint feature: The specified list does not exists

I'm using SharePoint 2010 Foundation and Visual Studio 2010 Ultimate. I'm working on a Web Parts with two features: Feature1 - My Web Parts Feature2 - Contains two Visual Studio module with CSS and ...