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
183 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
1k 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
179 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
563 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
27 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
177 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
3answers
485 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 ...
0
votes
0answers
35 views

Force Postback on a ListForm

I have a jQuery script that toggles some fields on a ListForm. It worked great on my jsfiddle, but when I added the script to a CEWP on the page via the content link, I can tell it's running b/c when ...
1
vote
3answers
3k 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
1k 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
134 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
195 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 ...
0
votes
1answer
2k 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
174 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
807 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 ...
0
votes
2answers
1k 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 () { ...
1
vote
1answer
506 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
0answers
28 views

Unable to run Sharepoint-specific JS referenced in embedded webpart

I have a script that I'd like to run on a specific List view. Per the instructions found here, I added a new web part to the NewForm.aspx page and added the appropriate HTML to link to the desired ...
0
votes
1answer
97 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
256 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
0answers
112 views

Unable to get the JavaScript event when I remove the user from people picker control

I have applied the jslink to the new form of custom list. In that JSLink, I am getting the user profile property and displaying it in label. But I want to blank the text of label when the user name is ...
0
votes
0answers
179 views

programatically create “create new file” call out for a link

I've a link on my home page. when I click on it I've to open "Create New File" callout of user skydrive "Documents" library. I found there is a OOTB function "CreateNewDocumentCallout" function ...
0
votes
3answers
182 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
331 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
215 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
2k 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
1answer
366 views

Call executeQueryAsync method second time gives first time result

In the code I tried to get the data from 2 different LIST. Input of the second query will be done after executing first list. $(document).ready(function () { $("#SearchButton").click(function ...
0
votes
1answer
75 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. ...
3
votes
6answers
2k 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
47 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
1k 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
494 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
64 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 ...
7
votes
4answers
2k views

How can I disable the Document Library drag and drop function?

Before I start - I'm new to this SharePoint development lark and am slowly familiarising myself with it. We're using SharePoint online and I have amended the SharePoint out-of-the-box document ...
0
votes
1answer
181 views

Display Form Text Inaccessible via JS

I'm overriding the Display Form of a list as per Mark Rackley's blog post: http://www.sharepointhillbilly.com/Lists/Posts/Post.aspx?ID=47 For this particular list, I need to parse a text field, split ...
1
vote
0answers
52 views

Unable to get related information from related list and display it on textbox on parent list using logged in user

I have two lists Created for my leave application in sharePoint. I need related information's come from related list (Leaveinfo) and display it on the textbox in Parent list (LeaveApply). I have ...
0
votes
1answer
81 views

Additional page head delegates with 2 scripts

I have a question regarding the additional page head delegate control. Basically this delegate controls helps to register some scripts in my case. But i have 2 different additional page head delegate ...
0
votes
1answer
276 views

Unable to create Image Slider web part using slideShow.js

I want to make the web part for image sliding for Picture Library. I got this link for doing so. My code for visual web part is : <!DOCTYPE html> <html> <head> <meta ...
2
votes
2answers
123 views

Prevent target=“_blank” on Workflows

We have recently upgraded from SharePoint 2007 to SharePoint 2010. Now whenever a user clicks on a workflow to run on a list item it opens the initiation form in a new window. I have gotten 20+ ...
2
votes
3answers
186 views

Which javascript event is fired when remove person from people picker?

I want to handle the javascript event whenever the person is removed from the PeoplePicker control in new form of custom list. If any person is removed then corresponding department value should be ...
2
votes
1answer
324 views

“Type SP.ULSTraceLevel has already been registered” error while applying javscript to NewForm.aspx

I have a custom list in which I want to apply the javascript in new form of that list. Javascript loads the user profile property of the entered user in the people picker control. I am getting ...
2
votes
1answer
65 views

Integrate SharePoint Calendar in hybrid app

I am trying to have a calendar feature in a hybrid mobile application. One company has a SharePoint site, whose calendar events i want to sync to the mobile app. So far through REST i can see in a ...
1
vote
1answer
154 views

How to save the webpage data as pdf using javascript

Using window.showmodaldialog(), populating HTML data as popup. We need the same populated data as PDF using JavaScript (Without using third party tools), how can we do this?
3
votes
6answers
3k views

Enforce Drag and Drop documents to apply metadata

We have implemented an issue management system in SharePoint 2013 which provisions a page for every issue added to a specific list. One of the Web Parts the automatically provisioned page contains ...
0
votes
2answers
3k views

How to get document URL of a Document Library item given Item ID and URL - using javascript?

I have access to a document library item URL. E.g. /Documents/Forms/DispForm.aspx?ID=585 Based on this information, I would like to get the URL of the document associated with this item. E.g. ...
3
votes
1answer
88 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 ...
0
votes
1answer
262 views

Add showWaitScreenWithNoClose to SPServices GetListItems

With a button on page which calls the function createListItems() which is added to the page as a link in a CEWP. The function takes 10-25 seconds to complete (get items from one list and add them to ...
0
votes
2answers
611 views

How to store the value into the xslt variable returned from Javascript function?

I have created a template in ItemStyle.xsl for CQWP. I want to store the xsl variable value that is returned from javascript: My template is: <xsl:template name="DepartmentsTemplate" ...
4
votes
1answer
214 views

SP.UI.Status anonymously inaccessible

Using Office 365 (SharePoint Online) I have stumbled into an annoying thing. Some parts of the JavaScript CSOM does not seem to be accessible when your browse the site anonymously. If Firstly I tried ...
0
votes
2answers
1k views

Get current ListItem with ECMAScript

I need to calculate a value for a custom ListItem field, based on some values on the same form and also on some values from other lists. I should be able to do this, using ECMA Script. I started by ...