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)

1
vote
1answer
258 views

Filter Calendar view by Title in SharePoint 2010

i want to filter calendar view using title field. Is it possible to filter calendar view without make changes in modify view ?
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
748 views

Reload Calendar without refreshing page in SharePoint 2010

How to reload calendar without refreshing whole page ?
2
votes
3answers
3k 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
3answers
2k views

Open a modal from a link in wiki-site: Sharepoint removes javascript

so I tried to add a little horizontal menu to a wiki-site and wanted one of the links to open in a modal Dialog (a contact form). Every time I try to add it about the UI, sharepoint removes the link. ...
0
votes
1answer
247 views

Javascript in SharePoint:MenuItemTemplate

I have Created one aspx page and write in Main Content. I want to call SharePoint Modal Popup script on click event in sharepoint:MenuItemTemplate. How can i call javascript for modal popup in in ...
1
vote
1answer
183 views

Accessing page metadata properties via clientside API

Morning all, Can anyone advise if it's possible to access a document / web part page properties via the client/JSCript API for use elsewhere on the page. To put this in context, I've inherited a ...
1
vote
1answer
816 views

How can I use knockoutjs with SharePoint 2013?

I want use knockoutjs in a SharePoint's App. I never use it, there are some problem to use it in a new SharePoint 2013 app?
0
votes
1answer
164 views

Hide 'View Item' link in preview window in sharepoint asset library

I need to hide 'view Item' link in pop up (shown below) from preview window. I uploaded a video in asset library. As per requirement users should not download videos from library. How to hide or ...
0
votes
2answers
359 views

SharePoint 2010: Application Page: Javascript error: “is not a function”: works on one environment, not on another

I have a SharePoint solution with an Application Page, which references several Javascript files. I have a sandbox server where I test and a production server. I did not set up either of these ...
2
votes
1answer
2k views

SharePoint DateTime field as Read-Only

How to make SharePoint DateTime field as Read only in NewForm.aspx? I'm using the below script to make DateTimeColumn as read only. It's working fine in firefox & not in IE9. Calendar icon ...
1
vote
1answer
244 views

SharePoint DateTime format as DD-MMM-YYYY in List NewForm

How to bring the DateTime format as DD-MMM-YYYY in SharePoint list NewForm.aspx?
1
vote
1answer
1k views

How get item in CommandUIHandler EnabledScript use javascript

can anyone help me with the problem: I have a list external items from my system and i add a custom button on a ribbon. My item has a state and depending on the state my button should be available or ...
2
votes
0answers
768 views

How to add the standard sharepoint list item context menu?

we have written a webpart that outputs titles of list items. We now want to add to each of those items the standard flyout menu (see the picture) below, but don't know how so far. Can you help us out ...
1
vote
5answers
3k views

How do I Inherit the CSS Theme Color in my Sharepoint 2013 App?

I am building a Sharepoint 2013 App in Javascript / HTML / CSS and I want to implement / inherit the color / class / css used by the theme. How do I do this? I want to ensure consistency through ...
2
votes
1answer
411 views

I want to remove “Overwrite existing files” check from rteUploadDialog.aspx in sharepoint 2010

I need to uncheck the "Overwrite existing files" check that comes by default on the rteUploadDialog.aspx page (while adding file to a rich text box in OOTB lists). How can it be achieved? If I modify ...
2
votes
1answer
984 views

ECMA/js CSOM retrieving items from multiple lists with async processing? how?

I am struggling with javascript and learning callbacks, and applying this to SharePoint 2010 specific js/jquery methods of getting and savings values from lists. So I am recently getting into the ...
0
votes
1answer
521 views

Grabbing a filter value via CEWP code behind

I have employed a Query String Filter to parse a value and send it to a chart web part. now I would like to use this value in a CEWP to provide an explaination/clarification for the chart, but the ...
1
vote
0answers
100 views

Getting column information from a sharepoint 2010 list

I'm trying to figure out how i can get information about a column in a Sharepoint List, like what type of column it is (single line, number, date etc...) and whatever additional column info that ...
0
votes
3answers
926 views

jquery client object model to return json: what about caml vs. js filtering?

trying to learn client object model (ecma/js/jquery) approach to returning json data and working with that. below I will supply a quick example, but my question is basic context of how would I go ...
13
votes
3answers
17k views

SP.SOD how to use correctly?

SP.SOD is a nice feature of SharePoint, but how should I use it? For example, I use these lines of code ExecuteOrDelayUntilScriptLoaded(function () { //code }, "custom.js"); If I understand ...
1
vote
0answers
213 views

Unable to access the SP2013 App from IE but able to access from chrome

I've started working on SP2013 App development. When I'm deploying the app from VS2012, the App is successfully getting deployed. But after Trusting the app, it is showing "Internet cannot display the ...
0
votes
2answers
116 views

How do I retrieve associations items for list field using JavaScript

I have any ExternalContentTypes(ECT) with associations between them. One ECT is shown in an external list. I want to add a custom button on that external list ribbon. And it must change value ...
4
votes
4answers
4k views

Is there a way to get current item Id in Edit form

I open a list item for editing and want to execute some JavaScript for this but I can't retrieve the item Id in the Edit form. I use following code: var context = SP.ClientContext.get_current(); var ...
0
votes
2answers
748 views

CSOM list query with JOIN, return tree structure

I have two lists, Parent and Child. The Child list has a lookup field called "Parent", which "looks into" the Parent list, using ID column. Using CSOM I'm joining the lists with this query ...
0
votes
1answer
192 views

How do I stop Sharepoint 2010 from asking to download html links as files?

At first glance it looked as though my issue was one that could be resolved by implementing the fix mentioned here but I am still encountering the issue being that html links are being downloaded ...
0
votes
2answers
2k views

Conditional Show/Hide Field in NewForm.aspx with Javascript/Ajax

I want to show/hide a Field according to the selected value of a Choice field. How can i achieve this with javascript or AJAX? Edit: I tried this but, i cant even get the value of the selected value ...
0
votes
1answer
5k views

Jquery + Instant Search / Filter of a list

I've seen a clip on bentedder.com where this developer got instant search (filter) to work within a webpart list view. I find this may be very useful for general 911/411 annoucements and archive if i ...
5
votes
2answers
6k views

CSOM get list items, return simple data structure

If we take this code example, we can see we need to call a lot of methods to get to our results (.getEnumerator(), .get_current(), .get_title(), .get_title()) var siteUrl = '/sites/MySiteCollection'; ...
2
votes
1answer
746 views

Missing SP.Ribbon.js

I am running into a strange problem that SP.Ribbon.js is not getting loaded. Normally if I view page source, there will be a bunch of RegisterSod(...) lines that loads a bunch of sharepoint ...
0
votes
3answers
2k views

'SPServices' is null or not an object

I need to find out if logged in user belongs to a specific sharepoint group (2010). I am using below code to get it. but getting javascript error as 'SPServices is null or not an object'. ...
0
votes
0answers
375 views

Created a layout page, but getting a parentElement null error

I've created a layout page, when I run the page and look at the JavaScript console, I get a 'parentElement' null error message like this: Uncaught TypeError: Cannot call method 'parentElement' of ...
0
votes
1answer
2k views

SP.Web.EnsureUser(user) does not seem to work. (JavaScript Client OM)

Supposedly, SP.Web.ensureUser(user) works according to this MSDN link but I cannot seem to get it to work in my JS code. While debugging, I can see that SP.Web exists and the user variable is ...
0
votes
1answer
4k views

Filter a SharePoint-List as you type with Javascript/jQuery

so my scenario is: My users don't like the filter technology provided in SP2010 Lists and Listviews (using the row-titles' dropdown) and likes to have a "normal" textbox and search the splist (one ...
2
votes
1answer
218 views

Why is SP.js is not registering for Anonymous Users?

In SharePoint 2013 I tried: ExecuteOrDelayUntilScriptLoaded(function () { alert("Hi"); }, 'SP.js'); But SP.js is not registering for anonymous users.
7
votes
4answers
6k views

ExecuteOrDelayUntilScriptLoaded too slow in Firefox and Chrome

I want to use CSOM but waiting around 2 or 3 seconds after page load before I can even do my first query is crazy! See below. Using jQuery dom ready shows a reasonable ready time, but SP.ClientContext ...
9
votes
4answers
8k views

How to avoid caching issue when using custom JavaScript and CSS deployed under _layouts?

On our farm, I'm deploying some JavaScript and CSS files under the _layouts folder. I'm then referencing them, where it's required using a <SharePoint:ScriptLink> or a ...
4
votes
2answers
709 views

SP 2010 JavaScript events

I want to hook into certain events on a SharePoint 2010 site, specifically the modal dialog open and close events. Does SharePoint 2010 trigger any events for these kinds of actions? If so, how do I ...
2
votes
3answers
3k views

Unable to get correct element on a sharepoint page using document.getelementbyid('<%textboxID.ClientID%>')

I have a sharepoint website which has multiple instances of the same visual webpart. On button click I am trying to get a textbox present in the usercontrol of the webpart using ...
1
vote
1answer
2k views

Is there a way of inserting javascript function as an onclick attribute, or href attribute to a hyperlink in sharepoint page

So, is it possible to add a link as follows (or some equivalent to this) <a href="javascript:somefunction()">Click Here</a> into the Sharepoint page, but without using Content Editor ...
2
votes
1answer
177 views

SharePoint - Detect Silverlight Version and upgrade if necessary?

My Silverlight 5 app is hosted in SharePoint Online. It doesn't load (sticks at 100%) for users who have Silverlight 4 versions. How should I upgrade those without the latest version to Silverlight ...
1
vote
1answer
32 views

Disappearing Images

I am still new to Sharepoint and I am trying to upload some files from my staging area to production. Everything work in staging however when I move the files to production, I noticed that there are ...
4
votes
3answers
1k views

Commit modal dialog and then display notification

I have a modal dialog that I commit by calling window.frameElement.commitPopup(), and this is great because it refreshes the parent window. However I would also like to display a notification on the ...
0
votes
1answer
355 views

Server side validation if Javascript disabled on user's browser

I have developed a small form with 3 input type = text and one input type = submit button. The end user fills the form and submit it, but no data inserted into backend List. (probably empty form is ...
3
votes
1answer
158 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 ...
2
votes
2answers
1k views

How to retrieve Sharepoint list data in master page

I have Created Custom Master Page. and i want to access SharePoint List Data in this Master Page using JavaScript. I write the following script to access data but it gives error that ...
3
votes
2answers
4k views

CustomAction: UrlAction to open link in a new window

I have added a menu item to the Personal Actions menu by creating a CustomAction like so: <CustomAction Id="myCustomAction" GroupId="PersonalActions" ...
2
votes
1answer
1k views

How can I get specific SharePoint site GUID using javascript/jquery

For example: I have a site under this url: http://intranet.contoso.com/news When I open it i would like to read it's GUID for future use in my custom AssetPortalBrowser.aspx url picker. Thanks!
2
votes
3answers
5k views

Remove ribbon entirely on certain page?

Can this be done with SharePoint Online? Failing that, for an entire site? Thanks.
0
votes
2answers
1k views

Add multiple people using Javascript Client Object Model to a Field of Type SPFieldUserValue

I want to update a UserField client side. I found the following code at this topic How to Use ECMA CSOM to Set a Field of Type SPFieldUserValue Tried the following code: var users = new Array(); ...