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
197 views

Get rid of Horizontal Scrollbar on SharePoint Online Public Website?

On my out of the box public website have a horizontal scrollbar I can't find the source of. No matter how I try to find it's origin, I'm having trouble getting rid of it. It may be an error in the ...
3
votes
1answer
91 views

How to remove default user from SharePoint 2010 calendar

I want to ask if there is a way to remove default user from SharePoint calendar. I am adding users via javascript, so default user is not needed. Maybe it is possible to do this by editint ...
3
votes
1answer
196 views

SP2010 possible to create a text file in document library and fill with data from list using JSOM JavaScript/jquery

Is it possible to create a new item in a library and default that to a txt file or XML and using JavaScript or jquery insert data from a list into that file? For example from a page click a button ...
3
votes
1answer
2k views

SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively

I have seen a lot of examples and questions about this out there but nothing I have found has helped me accomplish this. I need to be able to grab all the names of the documents within a given ...
3
votes
2answers
3k views

Disable a form text field with jquery in CEWP not working in Chrome/Firefox

I want to simply disable a text field (specifically a "person/group" field text box) from being editable on the edit form page of my list item. I have it working in IE using a Content Editor Web Part ...
3
votes
2answers
3k 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, ...
3
votes
1answer
634 views

“500: Internal Server Error” when trying to add a simple text file as an attachment via SharePoint 2013 REST API

Using SharePoint 2013 REST API, I am trying to attach a simple text file to a list's item. jQuery.ajax({ url: web.get_url() + ...
3
votes
1answer
2k views

The field 'EventDate' of type 'DateTime' cannot be used in the query filter expression

I am trying to filter standard Calendar events via SharePoint web api and my query looks like this: /_api/web/lists/getbytitle('calendar')/items?$filter=( EventDate ge ...
3
votes
1answer
137 views

Checking if the content database is in read-only using javascript?

Hi I'm pretty new to SharePoint and javascript. I am trying to check if the content database is read-only, and if it is then preform a function eg. if ...
3
votes
2answers
600 views

Generate file then close SharePoint dialog page

I have a custom solution where I open a SP Dialog box through Javascript. From this dialog, I want to generate a file and sent it to the user when he is clicking on a button, than close the dialog. ...
3
votes
2answers
510 views

Using javascript linking between issue list and document library

I'm making a issue list that should have link to a document library. After registrered I want the dispform.aspx to show a link to the library with filter on the ID from the issue list. I know ID ...
3
votes
1answer
422 views

SharePoint List items, UserControls and cookies

I have another task at hand. I need to use cookies to read a title of an item from a custom list in SharePoint. This task is for SharePoint 2010. I have a container set up that will display the ...
3
votes
1answer
287 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
861 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
183 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
370 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
318 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
363 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
150 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
192 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
253 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
369 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
224 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
12k 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
465 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
6k 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
3k 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
673 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
657 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
2k 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
2answers
184 views

Creating Folder using REST and JavaScript

I'm trying to create a Folder in a SharePoint Image library. I found an answer here but I can't seem to get it to work var web = 'my relative path to the current web'; var lib = 'name of the image ...
2
votes
3answers
6k 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
2answers
192 views

Changes in SharePoint Online (Office 365)

I have an idea to solve a problem by adding jQuery/javascript to a aspx page (in this case the DispForm.aspx) But I thought I've heard that SharePoint Online installs automatically updates. Can this ...
2
votes
3answers
935 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
476 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
105 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
2answers
7k views

What is the proper way to add custom CSS/JavaScript SharePoint 2013 site?

I would like to tweak the default layout in SharePoint, e.g. add... .ms-number { white-space: nowrap; } ... to all pages. I know it is possible to modify a master page directly, but is it the ...
2
votes
1answer
157 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
746 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
3k views

Scroll position in Sharepoint 2010?

Do you know a way to find out a scroll position in JS or jQuery on a page in Sharepoint 2010? I have a web part that is very big (high) so scroll on the page appears. But I cannot determine the scroll ...
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
2answers
187 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
4answers
1k 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 ...