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)

2
votes
4answers
8k 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 = ...
0
votes
1answer
6k views

Programming to retrieve list items in a SharePoint list using Javascript

I have requirement which is Retrieve List Items in a List(list created through OOB) Display those list items on the sharepoint site by binding to repeator control Using javascript and client object ...
11
votes
3answers
17k views

Check if user is in a specified group

I would like to check with JavaScript if the current logged user is in a specified and specific group (for example called "Admins Group"). How can I do? Thanks
2
votes
3answers
4k 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 ...
0
votes
2answers
618 views

Ribbon Button activating when a field in the Document / List item metadata = 'Yes'

Im hoping this is an easy answer as Im sure it must be, but my mind has gone blank! Basically I have created a button to run some javascript code to fire a custom (manual) workflow on an item that is ...
1
vote
1answer
521 views

modifying the url with javascript

In Sharepoint 2010 I'm trying to do a custom google search based on the currently logged in user's username. For example if a user named john clicked on the link he would be directed to ...
1
vote
0answers
147 views

Custom Field RenderPattern Customization - SharePoint 2007

I'm creating a custom field in SP 2007. I need to Get the Custom field value and field properties on Item click, in the list item display view. Also i Need to pass these values to a JavaScript. So, ...
0
votes
1answer
343 views

I have to create the pivot table and pivot chart based on the sharepoint list data 2010

I need to create the pivot table and pivot chart based on the sharepoint list data 2010. Please help. Thanks!
4
votes
2answers
1k 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\' />', ...
1
vote
1answer
4k views

Retrieve Iist Item column values with column names on Item click, JavaScript

I need to retrieve List item column values with column names on item click. In SP2010, I have a XSL which calls the JavaScript. I have sent the list item id through the XSL into the JavaScript ...
0
votes
0answers
230 views

Filter/compare two arrays from CAML query

I'm using JavaScript/Client Object Model to retreive some data by CAML query. I've 2 CAML queries. One retrieve all data from a specified column. The other query retrieve data from same column ...
0
votes
1answer
107 views

Issue when getting library GUID through JavaScript

I'm using SharePoint 2010. I need to get some SharePoint data on a list item hyperlink click. Inside the JavaScript file there is a method getLibraryGuid() I get the targetLibrary value with no issues ...
3
votes
2answers
2k views

View custom field property value using JavaScript

I'm using SharePoint 2010. Need to retrieve the Custom field property values using a JavaScript. [Trying to do this during item click in the SharePoint list item view. I call the JavaScript on the ...
1
vote
1answer
1k views

How to use JavaScript to get form data, and add it to a list

Obviously it is possible to gather data from a form using JavaScript. Microsoft also claims that is possible to add items to a custom list using JavaScript, although I have not gotten that to work. My ...
1
vote
1answer
414 views

PreSaveAction not returning True

I have a custom list form that processes information. There is a people picker on the form that can contain multiple users. When the user hits save, the js code parses through each user in the ...
11
votes
2answers
2k views

color code in sharepoint calendar

I have sharepoint calendar and I want the entries to be in color based on status. If user add one entry and status is initially pending then that task would be in green, later it get changed to 'in ...
1
vote
1answer
1k views

Unable to assign date to date picker control using javascript

I want to set the today's date to the DateTime control of sharepoint. My code is: $(document).ready(function () { var today = new Date(); var dd = today.getDate(); var mm = ...
2
votes
2answers
2k views

Using JavaScript file in Elements.xml

I am trying to create a custom ribbon and in my project I have created a JavaScript file. From this and this question I was able to figure out that I can use <CustomAction> tag to import the ...
1
vote
2answers
311 views

version control scripts in document libraries to TFS

How can I version control in Microsoft cloud TFS the html and js files which are stored in document libraries? I have these kind of questions: How could I "publish new versions of the solution" ...
1
vote
4answers
463 views

Is it possible to change Web Part attributes via CSS or XSLT?

I am working on a dynamic SharePoint design using DVWPs. I have a hidden DVWP which controls other webparts based on values in a list. I'm running into a slight snag, though. I need to know if it's ...
1
vote
2answers
164 views

Question about using CSS with EasyTabs 5.0

Not sure if this would be the right place, but I have a question about the EasyTabs 5.0 solution for SharePoint 2010. The author's website (www.pathtosharepoint.com) appears to be down at the moment ...
3
votes
1answer
546 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 ...
1
vote
3answers
5k views

Using CSOM to get list item count for multiple lists

I am trying to create a function which should loop through all lists on current web and display their current item count. My code so far: <!-- language: lang-js --> ZN.updateDocumentCount = ...
4
votes
1answer
596 views

Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API

In one of my tasks,i was struck with one issue,that is "While uploading multiple files into document library with REST API". Iam trying to upload multiple files in library with REST calls for an APP ...
0
votes
3answers
2k views

Populate dropdownlist with only active and checked in vehicles using javascript

I'm not sure if this can be done or not but I'm creating a vehicle reservation site and need to populate a dropdownlist with only cars that are both active and not requested for the same period of the ...
2
votes
0answers
29 views

Instrumenting search term in SharePoint2010

I know SharePoint2013 can capture this data better but in 2010, i am trying to capture exactly what terms people are searching for. I have analytics logic that i can call as javascript. My search ...
2
votes
3answers
800 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
0
votes
4answers
2k views

Check user from sharepoint group and redirect

My requirement is when someone login to site and if he belong to 'owner' group it need to navigate immediately to specific site and if he belong to member group then need to navigate to another ...
1
vote
3answers
8k views

How to get user security group name through javascript

I use the following code in javascript to display name of logged in user. SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getUserData); Is there a code that will also tell me security group of ...
0
votes
1answer
2k views

How do I update a list item using REST and Data.js?

I want to write a simple SP hosted app that edits a single list item in a list in the app web. Getting the list item collection is fine. Then I want to pass the result to a function that changes the ...
0
votes
1answer
381 views

Set Publishing Link Field Value on New item form using Javascript

I want to set default URL for Publishing Link Column in my SharePoint New Item form using javascript. Below Field's value should be set to http://a.com/ on form load. <SharePoint:FormField ...
0
votes
1answer
819 views

Jquery show loading progress [closed]

Good day, I have a page with several javascript pages that get loaded. How can I check that all the JS files have been loaded? I tried the below with just alert boxes. $(onPageLoad); function ...
1
vote
1answer
5k views

Add item in SharePoint 2010 document library using JavaScript [duplicate]

Is it possible to add a new item in a SharePoint 2010 document library using JavaScript (client object model)? I have successfully created list items in other type of lists, but when it comes to ...
2
votes
1answer
256 views

Open web part properties panel with javascript

I'm looking in a way to open the right side properties panel of my web part with javascript. This way when the user adds the web part to a page, a message and a button are displayed. Onclick the panel ...
1
vote
4answers
2k views

JavaScript in a SharePoint page

I am trying to run my JavaScript code in SharePoint2010 but I don't know how to do that. I created a visual web part and added the following simple JavaScript code, but it's not executing in my ...
3
votes
3answers
3k views

How to set user in multi allow people picker control using javascript

I want set the value to the people picker control which is multi allowed. I have a code which assigns only single value to it, which is as below: $(document).ready(function () { ...
3
votes
1answer
1k views

JavaScript from MSDN won't work (error: unexpected response from server)

I used the code from "How to: Complete basic operations using JavaScript library code in SharePoint 2013", the part underneath "SharePoint website tasks". I'll just paste the code here, so that you ...
0
votes
1answer
118 views

Call jQuery and other scripts for the entire site collection

I want to be able to use jquery and other javascript files across my entire site collection. If I create a new site, it should already be calling jQuery. I don't want to have to worry about whether ...
0
votes
0answers
487 views

SharePoint Modal Dialog Box not launching when on live server

I have an aspx page, which contains a file upload control, which has an onClientClick method which triggers a javascript method to pop out a modal window informing the user to wait: <table ...
0
votes
3answers
415 views

Show progress indicator until last row has loaded into DVWP

I have designed a DVWP in SharePoint Designer 2010 that shows multiple items from a library (let's say it shows 1000 items for example) grouped by category. What I would like to do is show a loader ...
0
votes
2answers
1k views

Change file name

I am updating a file in document library using a Put request from the client side. I need to know, how to change the file name after the file has been updated. My upload code is working fine. I can ...
1
vote
1answer
433 views

Hide controls on the NewForm.aspx

The newForm.aspx page of the SharePoint Calendar has a radio button for "No end date". I am trying to use the function below to hide the radio button. Is the title of the radio button the display name ...
2
votes
3answers
4k 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?
0
votes
2answers
1k views

Call executeQueryAsync method second time gives first time result

In the code I tried to get the data from 2 different lists. Input of the second query will be done after executing first list. $(document).ready(function () { $("#SearchButton").click(function () ...
0
votes
1answer
449 views

SharePoint hosted app, edit JS on the server

For me, one of the handy things about developing JS only apps is you can deploy the file to SP, get sneaky, open the js file from the file system and edit away, hitting save and refreshing the page. ...
7
votes
4answers
5k views

How to run javascript code only when list item gets deleted?

ANSWERED! See bottom of original question for the working answer. I'm trying to find out how I can run a piece of JavaScript code the moment a list item gets deleted. So it should be some sort of ...
0
votes
1answer
61 views

How to cache js/css/media assets from server in apps?

If you reference for example a JavaScript library from a CDN it will loaded from the browser's cache if it has already been downloaded. But SharePoint doesn't always run in a Internet facing ...
1
vote
4answers
3k views

“Injecting” status icons in SharePoint list

I have a list that have a date column called 'Expired' and must somehow represent the status as an icon (example in image) The solution must be deployable on farm level since the expires column may ...
1
vote
1answer
1k views

Get Sharepoint 2010 search results using Javascript Client Object Model

I need Sharepoint search results from Cient Object model using javascript Client object model. Can anyone please tell me how to do it for sharepoint 2010
1
vote
1answer
107 views

How to convert result set properties to string?

I used $SPServices() to return resultset from a calendar with many recurring events. Instead of changing my CAML query, I want to select only certain rows from the result set using JavaScript. I tried ...