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
2answers
283 views

CAML query multiple values javascript

When I run the following query I get an error: <View><Query><Where> <Or><Eq><FieldRef Name='ID'/><Value Type='Number'>164</Value></Eq> ...
0
votes
2answers
1k views

Defer SP.RequestExecutor.executeAsync

I'm working on a SharePoint app where I need to run SP.RequestExecutor.executeAsync() in order to grab some information from one of the Host Web's lists. Depending on what method is calling the oData ...
0
votes
1answer
1k views

SP2013 “_spUserId” is undefined

As we migrated our solutions and scripts from SP2010 to SP2013 my script ran into some weird error where I could not fetch the current logged in user with "_spUserId" anymore. var user = _spUserId ...
0
votes
5answers
3k views

JS/jQuery Check if on root web of root sitecollection

How is it possible to check in JS/jQuery if the user is on the root site of the root sitecollection in the webapplication? (Sharepoint 2010) Thanks! Example: ...
0
votes
2answers
856 views

Get web config setting value in javascript

Best way to get from a custom action js command an webconfig appsetting key value, or another similar approach. ideas? thanks. Reference a .js file on a custom action elements.xml on my ...
0
votes
3answers
5k views

Get the user id via javascript

How can you get the current users id using javascript? Can you do this any JS file or does it need to be added at a certain point?
0
votes
7answers
62 views

SP.js file not loaded in a simple JSOM example

I am creating a simple example that demonstrates client object model using javascript. I have ceated a simple JS file in Visual Studio and an aspx page using the SharePoint Designer. I have used ...
0
votes
1answer
4k views

getting list using JavaScript, error: Unable to get property 'apply' of undefined or null reference

In the context of a page in SharePoint 2013, I am trying to get items from a list using below code but when the query executes I am getting this error: SCRIPT5007: Unable to get property 'apply' of ...
0
votes
4answers
3k views

Object doesn't support property or method 'get_item'

When i try with this code i got error Object doesn't support property or method 'get_item' . Please help me to resolve function showTitles(urlColumnName) { var selectedItemIds = ...
0
votes
2answers
4k views

How to get List Name from JS Object Model - List Name from URL problem

I'm trying to connect Ribbon to Pages.. This works, javascript get what I need and pass as parameter to my page.. I pass the URL and the SelectedItemsID.. I'm facing a problem: If I had a List ...
0
votes
2answers
505 views

client object model and jquery not loading — sort of

I'm getting some data from a list via the client object model. After I get the list data, and the page loads, I want to use a little jquery to add a hover effect. Easy enough, right? Well ...
0
votes
2answers
2k views

Include javascript on application pages

I need to do some client-side alterations to some of the application pages, specifically the permission page (User.aspx). I need the javascript file to remove the "Administrate Parent Permissions" ...
0
votes
3answers
3k views

Setting display:none for empty web part zones

Does anyone know the JavaScript for setting display:none on an empty web part zone? I remember seeing it once on a publishing site but now can't find it. This is to avoid the padding and spacing a ...
0
votes
2answers
28 views

How to get app url?

I'm creating a javascript app for sharepoint, and I need to get the url of this app. The same url that is in content of site. I need another solution because when i try to simply reload the page with ...
0
votes
3answers
26 views

Issue in calling the function using ExecuteOrDelayUntilScriptLoaded()

I am facing issue while calling the function using ExecuteOrDelayUntilScriptLoaded() I am writing like: <script language="javascript" type="text/javascript"> ...
0
votes
2answers
143 views

JS ClientContext return undefine when deleteObject

I'm trying to delete a list item from a SharePoint library via JavaScript with ClientContext. Unfortunately I don't have access to the ID of the item that's why I use the Title and I can not delete ...
0
votes
2answers
165 views

Get SP.ListTemplateType enum value using JSOM

I am trying to create a new list (based on a dropdown menu selection) using JavaScript Client Side Object Model. var typeList = "SP.ListTemplateType." +listTemplateType; ...
0
votes
2answers
4k views

Uncaught TypeError: Cannot read property 'get_current' of undefined

this one is weird I hope somebody can help me. I created a custom action for a callout on a document library. I added the javascript code in a code snippet webpart on top of the document library ...
0
votes
3answers
108 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 ...
0
votes
4answers
351 views

How to get the list item column values based on the html drop down and display in the alert box using Javascript?

I have a html dropdown list(team name) which contains three values A,B,C I have a sharepoint 2010 List A which contains Team name and Email. List A Teamname Email A A@test.com B ...
0
votes
2answers
108 views

Javascript doesn't work for the users except System admin

Javascript doesn't work for the users except System admin. I checked in all files. And everyone can view the pages and sites. How can I solve this? <script type="text/javascript" ...
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
3k views

How to read URL/Description from a Hyperlink field using CSOM

Using CSOM (JavaScript) how do you get the URL and description fields from a Hyperlink field?
0
votes
3answers
325 views

Hide Sidebar on _layouts pages

I am trying to hide the sidebar on administration pages in SP 2010. To do this, I am trying to use the following Javascript code which does not seem to be working. $(document).ready(function () { ...
0
votes
4answers
2k views

How to verify in Javascript Object Model if a List Exists

How can I verify if the list I'm trying to retrieve in Javascript really exists? My code is: function Search() { var context = SP.ClientContext.get_current(); this.site = context.get_site(); ...
0
votes
2answers
97 views

c# and JavaScript

So i have this code sb.AppendLine( "var nameSplit = users[i].split('\');"); The sb.AppendLine is C# and the bit inside is JavaScript, I am trying to split users[i] so that I can strip out the ...
0
votes
2answers
5k views

SharePoint 2010 - pull value from SharePoint list and pass through HTML link

I have a list with a column that contains a url. For exmaple: --LIST-- ID Name URL 1 MSN http://www.msn.com -- Now, what I need to do is pull the value in the ...
0
votes
2answers
3k views

How can I retrieve list items from a subfolder using spservices?

I have a document library with subfolders containing images. I'd like to traverse the subfolders and grab the URLs of those images so that I can display them on my little js web app I'm whipping up. ...
0
votes
3answers
502 views

SharePoint redirect to add parameter

I want to add a parameter "Force=True" when the user is redirected to userdisp.aspx (when you click on people's name) What is the best way to do it? Details: I need that because I do not have a ...
0
votes
1answer
20 views

How to determine authenticated status on client side?

Do you know any syncronous way to get IsAuthenticated status for currentRequest in client side via javascript? I can get current user via client model, but it will be asynchronous. ...
0
votes
1answer
41 views

Get the current view name

In javascript, i need to know the current view. I found this post but in 2010 it doesn't work: How to get the current custom view name of my SharePoint List When i do context.view, it's undefined. ...
0
votes
2answers
58 views

Accessing a SharePoint 2013 checkbox with JavaScript?

It seems the way a checkbox renders in SharePoint 2013 server has changed from the way it was rendered in 2010. When I view the source through the browser I see... <!-- FieldName="MyCheckboxes" ...
0
votes
2answers
234 views

Remove item from ECB in sharepoint 2013

I am currently trying to write javascript within a script editor to hide the 'View Properties' and 'Edit Properties' items in the ECB. I have found many solutions that edit the core.js file. However, ...
0
votes
1answer
261 views

Want to access data using sharepoint REST Api in web application

I want to access SharePoint data in my application. I am new for this so don't know much about this to access data from SharePoint. I do not have permission on all pages in SharePoint so need to ...
0
votes
1answer
132 views

Check if the user has attached any file

When I open(edit) some item in a list I want to check with JavaScript if the user has attached any file in my Edit Form...
0
votes
1answer
143 views

Identify if a Library item is a folder or not in CSOM

I have Library on which I have created a ribbon button. On click of the button I am trying to identify if the selected item is a folder or a file. below if the code snippet that I am using: var ...
0
votes
2answers
1k views

get Library document URL using Javascript client object model

I am working with SP.js to get data from a SharePoint library. Below is the code i am using: var clientContext = new SP.ClientContext(); var oList = ...
0
votes
2answers
587 views

Current MySite url by javascript

I need to get the current user MySite Url using javascript / jQuery. I am using SP 2013
0
votes
2answers
343 views

Jquery to display date in MM/DD/YYY in sharepoint client object model [closed]

In My sharepoint list i have a Duedate if type DateTime.Using Client object model when we fetch the value from this Field, it is displayed in the below format(Mon Jun 23 GMT+0530 2014).How to convert ...
0
votes
1answer
19 views

buzzboost script on SharePoint page

l am trying to display a buzz boost script from feed burner into a Content Editor web part but it is not working. I noticed that when I activate the web part it removes part of the JavaScript. Any ...
0
votes
3answers
49 views

IE6 user browse Sharepoint 2013 get the same Javascript error on everypage

I understand IE6 is no longer support in SP2010 and SP2013. My only requirement is hiding the Javascript error and let the user able to read the Sharepoint page only. In my test environment, IE6 user ...
0
votes
2answers
6k views

The value of the property is null or undefined, not a Function object

I cannot for the life of me figure out why I don't get the null or undefined error here, the input button is where I'm getting the error in F12 or firebug....... <SharePoint:ScriptLink ...
0
votes
2answers
813 views

How to insert record to sharepoint multi choice field via CSOM

I am trying to insert a Multichoice (checkbox) field to sharepoint via the SP namespace in javascript. Updatnig single choice is simple. For Multichoice I have tried: var itemCreateInfo = new ...
0
votes
2answers
162 views

Ribbon javascript function reference

I was wondering whether there is somekind of reference available with the javascript methods called for each of the buttons in the ribbon. Question behind the question: I want to make a button on a ...
0
votes
1answer
122 views

How to find Web Parts on the current page using SP.js

I am trying to find out the title of the current page with SP.js without having to get it from the DOM. Is there a way to find what Web Parts are on the current page?
0
votes
3answers
2k views

count items in a list javascript CSOM [duplicate]

I am wanting to count the number of items in my list. Using CSOM in javascript I have tried it but my code doesn't work. Where am I going wrong. Here is my code: var clientContext = new ...
0
votes
1answer
522 views

Export my Enterprise Wiki aspx pages to a PDF files

Our client has asked if we can add a link to their current Wiki pages named "Export to PDF", so when the user click on the link the Wiki content will be exported inside a pdf file ? i got confused if ...
0
votes
2answers
96 views

changing css in jquery sharepoint list

I am wanting to change the css in jquery if a certain statement returns true. I have just been playing around without the statement but it doesn't seem to work. This is my js file: <script ...
0
votes
2answers
31 views

In which place we should paste Div tags in sp designer 2010?

I have a js file which needs some html div content. where exactly I have to add div tags content in aspx page in SP designer 2010 . Thank you.
0
votes
1answer
808 views

SharePoint 2013. JSLink (CSR) for field Type=“User” on EditForm

How to create custorm render for field type="User" on EditForm? I need to replace standart peoplePicker control with my custom render. Code below work without exeptions, but don't set 'Sponsor' ...