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

I am confused about the Javascript Client Object Model and when it can be used

Is it only intended for use "inside" SharePoint? Using the .Net/C# client object model I can execute applications on my local machine and access a remote SharePoint server. I can only find examples ...
3
votes
0answers
497 views

Bug: JSLink on field/column breaks callout menu in Chrome, Firefox [closed]

I am trying to use JSLink+JavaScript to customize the rendering of a field. My very simple JavaScript code looks like this: ;(function () { 'use strict'; console.log('EmployeeFieldCSR ...
1
vote
2answers
258 views

Site Permissions With Custom Navigation

I recently edited my organization's intranet site by creating a JavaScript file which utilizes jQuery v.8 and jQuery UI. My custom JS creates an unordered list with site navigation that has drop ...
0
votes
0answers
509 views

current user is always is administrator on a SharePoint App

I have tried following solution to check the current user's permissions on the current host web in a SharePoint hosted app, however the user is always administrator. function sharePointReady() { ...
1
vote
1answer
407 views

Help using the client side object model with javascript and jquery, reading an item

So I usually only deal with server side code, and need some assistance. in c# i was able to just do something like, numStirng = listItem["fieldName"].toString(); num = Convert.ToInt(num); ...
1
vote
4answers
2k views

Modal popup error in sharepoint 2013

var options = { url: "http://siteUrl/_layouts/Page.aspx?ID=6", width: 800, height: 600, title: 'Attach File', }; ...
3
votes
3answers
3k views

Adding notification from server side, code ignoring ExecuteOrDelayUntilScriptLoaded

I'm trying to add a UI notification from server side. To do this, I've written this code in one of my code behind event handler: private void AddNotifySuccessScript() { var ...
3
votes
2answers
4k 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, ...
0
votes
2answers
3k views

How to center a Picture Library Slideshow Web Part's Previous, Next, and Pause buttons

We have a Picture Library Slideshow web part added to our site but the buttons to control Previous, Next, and Pause/Play directly underneath it are off-center to the left for some reason. We need to ...
4
votes
1answer
1k views

Error using javascript to retrieve a SharePoint list's items

I am trying to use this method to query items of a column of a list in my SP site via javascript (the reason I am doing this is to display that info on the page by modifying the html tags in the DOM), ...
1
vote
2answers
250 views

Custom action doesn't navigate to another site

I have an issue with custom action. Here is the definition of my custom action: <CustomAction Id="GoToDefi" Title="Go To" Description="Go To" ...
2
votes
1answer
259 views

Display all documents from multiple document libraries using client object model

Can anyone help me with the code to display documents from multiple document libraries using javascript client object model. I have done displaying from single document library.
0
votes
1answer
592 views

Fill the fields in new form for an item

I've came across a requirement where I need to fill some of the fields in newform. So basically we start from view item, where we can see an existing item in a list, then we click something like move ...
2
votes
3answers
4k views

Add (replace) hyperlink to pictures in a Picture Library Slideshow Web Part

On our team site we have added a web part that is a "Picture Library Slideshow" web part. Currently clicking on the images that scroll in the slideshow directs the browser to just the image's URL. I ...
1
vote
1answer
337 views

Stop hover with navigation to just display links

I'm somewhat new to developing with SharePoint, so sorry if this is painfully obvious and I'm totally missing something. I have a publishing site that I'm working on, and I need to tweak the ...
7
votes
2answers
19k views

ExecuteOrDelayUntilScriptLoaded not executing after page publish

In SharePoint 2013 I have a page that is using the Script Editor web part. In the script editor web part I have the following: ExecuteOrDelayUntilScriptLoaded(startIt, "sp.js"); function startIt() { ...
3
votes
1answer
3k views

How to add Client Web Parts (App Parts) to a page from JavaScript CSOM?

We're working on a custom way of adding and deleting Web Parts and App Parts to a page in SharePoint 2013. We have to use the new App way of developing and all code has to be using the JavaScript ...
2
votes
2answers
3k views

CAML Query for sub folder documents javascript

I'm trying to query for documents in a specified sub folder of a document library. Using U2U CAML builder, I can generate the query and return successfully within it. However, when I run the query ...
10
votes
3answers
5k views

Can't upload a non-text file to SharePoint App via REST API

I am using the following REST code to add a file as an attachment to a SharePoint 2013 list item. <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <SharePoint:ScriptLink ...
1
vote
1answer
466 views

What is the purpose of SharePoint 2013 Site Content Type - “JavaScript Display Template”?

Under SharePoint 2013 Site Content Type - JavaScript Display Template Content Type is present, what is the purpose of the content type and how we use it?
4
votes
4answers
6k views

Query SP2013 Managed metadata term store

I was wondering if it is possible to query the Term Store via the REST API or Javascript Client Object Model in SP2013. I can't quite seem to work out the naming scheme for the REST API to discover ...
2
votes
1answer
3k views

JavaScript Client object model get content type

I have created a JavaScript file and deployed across my site collection. The code is supposed to get the content type ID from any upload form, figure out what this content type is and based on this ...
0
votes
1answer
144 views

Hiding “half” of the New button in the SharePoint ribbon

I built a calendar with multiple content types. What I'm basically trying to achieve here is to force a user to choose from those content types when creating a new item instead of defaulting to the ...
3
votes
1answer
867 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() + ...
1
vote
1answer
268 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
839 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
260 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
198 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
898 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
167 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
372 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
265 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
835 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
436 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
1k 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
549 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
103 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
1k 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
19k 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
223 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
117 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
5k 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
824 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
211 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 ...