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)

0
votes
1answer
208 views

How to dynamically load js file in master page based on aspx page loaded?

I have include all the link to my javascript file in my master page using tag. Can I load specific js file according to pages loaded? (for example, I would like to load home.js only when Home.aspx is ...
0
votes
1answer
142 views

Javascript- Fill Out a Form

I am working on a fairly complex system right now, and the task I am currently stuck on is the creation of a document using JavaScript. I have a form library created with Infopath, and I would like ...
5
votes
6answers
8k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
4
votes
1answer
436 views

SP.ScriptHelpers object

Just noticed the object the other day, and it looks like its on every page. But I can't find any documentation about it. Anyone used the "helpers" or seen any docs, or knows anything about it? Tbh ...
2
votes
2answers
3k views

Modify Attributes and Properties Using JSOM(CSOM)

Before I describe the problem, I want to clarify that what I'm looking for is A generic way of updating various attributes/properties using JSOM. I'm using an Office 365 dev account testing a ...
9
votes
4answers
1k views

Can I tell what version of SharePoint is being used from JavaScript?

I have some static JavaScript being rendered to a page and would like it to behave differently if the version of SharePoint it is being displayed by is 2013. Can I tell what version of SharePoint is ...
1
vote
1answer
1k views

Set value of choice field based on input from people picker

I have Choice Field which i use to filter items within a list. I'm trying to figure out a way to set value of this choice field within my edit form is there is a name in the people picker field. ...
2
votes
1answer
2k views

Using Javascript to change the view on a calendar web part

I found a very simple snippet that I can add to a CEWP that changes the view in a calendar web part from Day, Week and Month. This is for an external facing SharePoint site and the ribbon will not be ...
2
votes
1answer
374 views

CAML Query Custom Ordering

I have looked around a bit, but have not found any reference to this particular issue. Is it possible to specify a custom ordering in a CAML query? What I mean by this is, say I have a list with a ...
0
votes
2answers
2k views

Javascript fails in chrome and firefox, works fine in IE

I have this JavaScript code for my SharePoint forms which does not work in other browsers but Internet Explorer. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ...
2
votes
1answer
219 views

Footer does fill the whole width. Scrolling in document library

I have a problem with the footer not extending to the right side when scrolling to the right. (In a document library with way to many columns). Meaning the footer have a blank spot in the right side ...
0
votes
2answers
415 views

Adding a script reference to a SharePoint page [closed]

I tried adding a script reference inside the master page but for some reason the script is not responding.
4
votes
2answers
528 views

How can i add a custom tab to a ribbon at runtime using javascript/ECMAscript?

I'm trying to add a Custom tab with a group and some buttons to a single client via conditional javascript, as far as i can tell this is all found in the CUI namespace, however documentation is hard ...
0
votes
0answers
15 views

Uploading a document manually to a SharePoint document library using Jquery [duplicate]

I have been searching for a way to upload a document manually to a SharePoint document library using Jquery. i have done it in C#, but i want to do the same in Jquery. Still i couldn't find the way, ...
2
votes
1answer
2k views

How do I query the OData/REST API in 2013 effectively using JavaScript?

I want to use the improved OData/REST API in Sharepoint 2013 but it's hard to find good examples. As I see it, the OData-endpoint is of little use without a dedicated OData client library. With plain ...
0
votes
0answers
289 views

Modify list item field using javascript?

I'm trying to implement some Move Up and Move Down hyperlinks in a list so that, for example, pressing move up moves the item one place up in the list. I have tried giving the list an order column ...
1
vote
1answer
4k views

Convert Image src to base64 [closed]

I am working on Sharepoint 2010, I have create one custom button. when user select any row from list and click on custom button then I have fetch one multiple line column html in one variable name ...
1
vote
0answers
272 views

Office 365 Public Website JavaScript Snippets - how to remove

Playing around with Office 365 public website Master Page. Used security trimming to strip down the master page to reduce weight for use in responsive design. Assumption is we would not want any of ...
1
vote
2answers
2k views

Using a Dynamic Redirect in SharePoint

Here is the situation: I have two libraries, one housing current documents, and another which serves as an archive. I have a workflow which sends the owner a link to their document. The problem is ...
0
votes
1answer
402 views

Getting error “Object doesn't support property or method 'commitPopup'” when saving a new alert in SP 2010

In my SP 2010 environment, I have a html page, that has an iframe, and the iframe is the page where you create a new alert for a list. In the html page, I dynamically create the iframe and then insert ...
0
votes
1answer
279 views

How to create number field unique list using javascript?

I am creating lists from javascript in my app. Now I want to create a Field in that with unique values which is a number field. I am using following code: var fldCollection = oList.get_fields(); ...
0
votes
1answer
76 views

JavaScript CAML Query- Alter Column Name

Is there any way to control what name a column is returned as when a CAML query is run? I am interested in passing the results of several queries (on related items) to a single function, and as the ...
1
vote
3answers
3k views

How to get sharepoint userid from login name?

Hi I am trying to retrieve current userid _spuserid from login name.How can it be retieved? var userid=Function??("domain\name"); Any idea?
0
votes
1answer
45 views

Referencing a Library in JS

I am attempting to reference a document library in JavaScript. From what I have read, I should be able to open the library using something similar to the following: list = ...
0
votes
1answer
72 views

Javascript code not viewable

I've added a webpart to sharepoint and added a widget using javascript. The javascript displays weather information and a few links. When i view the source of the page I cannot see any of the content ...
0
votes
1answer
174 views

Writing Javascript code in XSLT

Can I write Javascript code in XSLT? Basically I will be calling Javascript's document.location.href to check which site is currently opened (English or Arabic). So let's say if English site is ...
0
votes
3answers
171 views

Does SharePoint 2010 support HTML5, createJS elements?

I'm trying to embed HTML5/createJS in a SP Content Editor Web Part. On my browser (Chrome): In SharePoint (Chrome): The background CSS renders, but not the createJS/HTML5 elements (canvas): Any ...
2
votes
2answers
2k views

_spBodyOnLoadFunctionNames not always working

This is in reference to SharePoint 2010. I am writing some custom javascript that needs to know when the page has finished loading. To accomplish this I am pushing my callback function on to the ...
1
vote
2answers
569 views

Problem with jQuery Function for Expanding Grouped Lists

In my portal, I have a custom list that is using grouping. Now, I want to automatically expand all the groups, so I have mustered this javascript/jQuery function. I use a delaying function to load ...
4
votes
2answers
7k views

Format Date using Javascript Object Model

I am using the javascript object model to get a date field back and display it on a page e.g. oListItem.get_item("MyTestDate") This displays on the page by default as: Thu Jul 25 09:30:07 PDT 2013 I ...
1
vote
2answers
633 views

Is it possible for a html textbox to populate a sharepoint column in a list?

Here is the scenario: SharePoint 2010 doesn't have a back button, this makes it difficult when a user messes up in a branched survey. I have created a little JavaScript embedded html page that I ...
0
votes
2answers
821 views

Totalling output from column for all entries in a list

SP2010: I need to come up with a total (number) of a column for all entries in a list. For instance: Given a list with entries which can be comprised of apples, oranges, and pears, and their ...
-1
votes
2answers
145 views

:net contra Javascript [closed]

If do some client programmering, what factors should I take it into consideration if I gonnna use javascript/ECMAScript or .net in relation to retrieve some functionality from SharePoint and apply it ...
2
votes
0answers
502 views

Install an app from the appCatalog using javascript CSOM

I'm trying to install an app in a site from the AppCatalog using the javascript CSOM I get the apps from the App Catalog using req.apps = SP.AppCatalog.getAppInstances(clientContext, oWebsite); I ...
3
votes
1answer
2k views

Javascript : How to handle version conflict errors when using javascript COM?

so I use quite a bit of the javascript client object model for CRUD operations to lists from custom pages (inputs) and I have found that I get version conflict errors on saves from time to time....its ...
0
votes
1answer
551 views

Javascript Object Model REST/AJAX: does callback/resulting function have access to the id of newly created item

so if I use rest like method to create a list item in javascript, can I get the id of the newly created item in the callback/result function? function createNewRecord(url, body, callback) { ...
2
votes
4answers
13k views

get the login name of the current user using javascript

var context = new SP.ClientContext.get_current(); this.website = context.get_web(); this.currentUser = website.get_currentUser(); alert(currentUser); i tried this code, but i got an ...
0
votes
2answers
233 views

Javascript in my masterpage loads in Firefox but not IE

In my masterpage, I've loaded a simple javascript file from /_layouts/myfolder/myjs.js - and the script loads and runs in Firefox (even in different instances and with different plugins) but not in IE ...
1
vote
2answers
2k views

Jquery is not working on sharepoint date time control

Hi In my application page i have a sharepoint datetime control. I am using jquery on text changed event to calculate the number of days and displaying in a text box. Now i want to fire the same event ...
6
votes
3answers
34k views

Get current user in Client Object Model with javascript?

var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); ctx.load(web); var user = web.get_currentUser(); alert(user); I used above code to get the current user using JavaScript, but I ...
2
votes
1answer
485 views

Getting survey list settings (questions, possible answers) via REST

I need to custom render the survey on the client side so I need to be able to get it's settings via a REST (or web service) call. I tried calling Web/Lists(listguid)/Fields and I get all the fields ...
1
vote
2answers
925 views

Is there a way to check if a workflow is completed using Javascript?

I created a form that start a workflow automatically when an item is created, and I redirect to html page that shows a message like "Processing... please wait.", and I wait 3 seconds and so redirect ...
1
vote
2answers
4k views

Attachment Upload using SPServices and Not the JS File API

I am trying to figure out how to use the SPServices JS library to upload a file without using the HTML5 JavaScript file API. This is specifically targeting IE9. I have a solution that works with all ...
2
votes
3answers
3k views

How to Create Piechart in sharepoint 2010 Based on the List item Values? Only using Javascript/jquery

I have a CustomList in Sharepoint 2010 as Mentioned Below.have two columns Team and Values of Team List A Team ValuesofTeam A 9 A 6 B 7 C ...
0
votes
3answers
4k views

Jquery to load dropdown on selected index change of another drop down in sharepoint 2010

I have 2 dropdowns. On Selected Index change event of ddlTaskFrequency dropdown i want to load another drop down. For example: If ddlTaskFrequency text= Daily or Weekly i have to load another ...
2
votes
1answer
690 views

In Chrome, Async Postbacks Fail

In Google Chrome, inside of an Update Panel, the first async postback succeeds, but the second silently fails. The issue is discussed many places: ...
2
votes
4answers
8k views

How to get result from SP.UI.ModalDialog.showModalDialog back to C#?

I have a code on a visual web part user control (see below): Could you please advice, how to get value from the callback function back to the C# in code behind to process it? <script ...
0
votes
1answer
91 views

Retrieve notifications with JavaScript

I want to incorporate social feed into my SharePoint webpart. I followed this tutorial: Code example: Retrieve social feeds by using the SharePoint 2013 JavaScript object model. Even if I used ...
1
vote
3answers
1k views

SP ECMA/JS get_siteUsers() not working? trying to get user with getByLoginName()

I am trying to get specific users with this line using ECMA but I keep getting error: this.oUser = cxt.get_web().get_siteUsers().getByLoginName('dev\\joe'); I keep getting property or method ...
4
votes
1answer
203 views

What is ULS2Vv:;?

I see that label in most SharePoint JavaScript libraries. I am curious - what's that used for? Example: EnsureScriptFunc("clienttemplates.js", "RenderUserFieldWorker", function () { ULS2Vv:; // ...