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

Hide upload Button on Asset Selector Dialog (AssetPortalBrowser.aspx)

I am looking to hide the "Upload" button in Asset Selector Dialog and I know Asset Selector Dialog uses Dialog.master in SharePoint. Is there a possibility to attach some custom jQuery/Javascript ...
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
2answers
361 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
2k views

Using Sharepoint client API to upload file as attachment in javascript

is there a way to upload file as attachment while using JavaScript client object model in sharepoint 2013? Or using web service in the middle is required? I cannot use FileAPI from HTML5. Thank you ...
3
votes
1answer
3k 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
1k 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
2k 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
1answer
860 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
986 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
5answers
8k 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
692 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
489 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
518 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
1answer
85 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
422 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
164 views

ctx in CSR not return the title

I need to make by clicking on the title of a list item, to open the edit form and not the view form. To do this I chose the CSR, I have the code: (function () { var statusFieldCtx = {}; ...
3
votes
2answers
601 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
1answer
85 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
142 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
2answers
285 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
3
votes
1answer
203 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
3answers
2k 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

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
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
2answers
2k views

How to get the ID of the list item just inserted using SP.UI.ModalDialog.showModalDialog

If I am using JavaScript Client Object Model and SP.UI.ModalDialog.showModalDialog to display a form to enter a new list item, how can I get the ID of that item after its been added? Example ...
3
votes
3answers
3k 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
679 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
462 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
40 views

How to get ClientPeoplePicker value using javascript

can anyone please tell me, How to get ClientPeoplePicker value using javascript.?
3
votes
2answers
109 views

Sharepoint REST service

Is there any way of reading the documents names of a Document Library using JavaScript from a web application that is not hosted in SharePoint? by the way, my requirement if for SharePoint 2010 not ...
3
votes
1answer
109 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" ...
3
votes
1answer
349 views

Get ID of item in ListView Web Part

How can I get the ID of an item in a ListView Web Part, on hover? I need this ID to fetch some columns from the list, and show them in a tooltip box. Can I get the whole thing done using ...
3
votes
2answers
75 views

Show library items to anonymous users in Office365

We have a client in Office365, they have been using the public site for a while now and we put in some javascript that pulls images from libraries and displays them in various places as rotating ...
3
votes
1answer
79 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 ...
3
votes
1answer
166 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
82 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
2answers
352 views

Creating a SharePoint Wiki Page via JavaScript and REST or CSOM

I'm fairly new to developing SharePoint 2013 Apps, and I was tasked to customize the Create New Wiki Page for a Site. The user has to type in the Title, I do some processing, and then when everything ...
3
votes
1answer
158 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
2k 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
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, ...
3
votes
1answer
569 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
132 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
573 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
492 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
406 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 ...