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
48 views
+50

SharePoint 2013 Custom Action Menu Item Logo?

I am wrapping up the development of a custom action on a menu item within SharePoint and have a requirement to add a logo to it. I have done some reading on this and it doesn't appear to be as ...
3
votes
1answer
24 views

How to get ClientPeoplePicker value using javascript

can anyone please tell me, How to get ClientPeoplePicker value using javascript.?
0
votes
0answers
10 views

400 (Bad Request) ERROR while trying to use JS files in Content Editor Web Part

So, I added some code in Content Editor Web Part and code is started like this: <script src="/<MyURL>/_layouts/15/SP.Runtime.js" type="text/javascript"></script> <script ...
0
votes
0answers
2 views

Resource field SharePoint 2013 calendar

I have a Resource field in the calendar in SharePoint 2013 in which user have to add the required resource. But i want to set the default value for the the resource field,so that user should not ...
3
votes
1answer
11 views

Script editor webpart ribbon problems

I added a script editor web part (javascript code) to a view page (/Forms/AllItems.aspx). After that I can not see anymore the File and List category in the ribbon bar. I read somewhere that ...
0
votes
2answers
12 views

Change By Name in sharepoint Blog site

How can i change the by name in blog site?. I checked that it is redirecting to /_layouts/userdisp.aspx?ID=17. I can get this id by running the below power shell script. But how can i change it in the ...
1
vote
0answers
13 views

Sequential number generator… with a twist

I have an assets list. The asset needs to have an asset number assigned upon creation. The format of the number shoulb A-99999. There are existing asset numbers I have to work around in order to ...
0
votes
3answers
34 views

CAML query rertieve all items from a SharePoint list

I have a JavaScript piece of code that I use to retrieve list item from SharePoint by selected options from drop-down list. Depending the selection it would assign a value to a CAMLQuery variable. ...
-1
votes
1answer
14 views

input box in sharepoint to add entry, popup

I have a button, when i click on button i need a popup which should have textbox and a button "ok". in textbox i can enter numerical values like 10, 12 etc and click on ok button. Later ok button ...
0
votes
0answers
19 views

onchange event select javascript on sharepoint

} $.ajax({ -top_cache.xml', // name of file you want to parse error: function () { alert("Error: Something went wrong"); } }); }); Wasn't sure if it was something sharepoint didn't like ...
0
votes
1answer
24 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 ...
8
votes
3answers
8k 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 ...
0
votes
2answers
28 views

Cascading dropdown not working

I am trying to get cascading dropdowns to work on a list, but I seem to be missing a point somewhere. Please help me out. I have added jQuery and jquery.SPServices to my masterpage. The dropdown ...
-1
votes
1answer
25 views

Add/delete list item using knockoutjs

I need knockout js code to add/delete a list item. Any ideas?
3
votes
0answers
19 views

Suspend and resume SharePoint Online workflow using CSOM - Ecmascript

I have a requirement where the Master user has power to interrupt any workflow and put it on hold and the approvals should be stopped on that workflow until the Master user resumes the workflow. When ...
1
vote
1answer
14 views

Return CurrentItem from context.Templates.Item JSLink

Any ideas on how to return from the Custom Item method when using JSLink (as if it was never called)? I want to do a check in this method and hide the row if the condition fails. I know I can do a ...
10
votes
4answers
9k views

SP.UI.ModalDialog.showModalDialog using the html option

http://msdn.microsoft.com/en-us/library/ff410058.aspx says that you can use the option html to display html text in a modal. I have a string like this; var html = ...
0
votes
3answers
51 views

Could JQuery or JS disable core.js?

I have a strange situation. I using the code below in a Java Script file and referencing it from CEWP. For some reason, I can't do Page or Site Action Edit anymore, it does not do nothing. However, if ...
1
vote
0answers
19 views

To Scroll to the top of page

I'm using angularjs & sharepoint 2013. I have implemented the SPA model in one page where the entire page refresh may not happen. Here, the scroll bar is not always going to the top of page since, ...
2
votes
1answer
81 views

SharePoint 2013 and javascript

What is meaning of OnDemand scripts and what is not-on-demand scripts? In SharePoint 2013, when do we use SP.SOD.executeFunc and when to use ExecuteOrDelayUntilScriptLoaded ? What is best practice?
1
vote
2answers
64 views

How to retrieve all items from a list by javascript object model and store it to array

I'm new to JavaScript Object Model in SharePoint 2010 and want to get some idea of that. I wrote below code to get all list items of a SharePoint library. This works fine and return all items. But I ...
0
votes
2answers
30 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
24 views

Accessing Webservice from SharePoint 2010

My webservice is hosted on one domain and my SharePoint site on another domain. I wanted to access my web service methods from client script (in SharePoint). What I am doing is Added reference of ...
4
votes
3answers
5k views

Sharepoint 2010. 'xsd is not defined' Error when trying to save edited list item or create new! IE9

In internet explorer 9 i have error when trying to save list item. Namespace prefix 'xsd' is not defined. Before that i have javascript error inside some sharepoint files. This error says really ...
1
vote
1answer
51 views

Add button to webpart with javascript

I want to add button to all web parts of my home page instead of add new item link and I've no idea how to create it For additional information I am using share point 2013.
0
votes
1answer
39 views

How to parse the output returned from REST (/_api/)?

When we use REST we get output as xml how do we parse this via JSOM and fetch the values? Also, please provide some information on how to use this in SSOM instead of JSOM?
2
votes
1answer
522 views

Site collection relative url in XSLT search or by JavaScript

I have the following question: I'm modifying the XSLT of the search, so it is represented differently etc etc .. in this occasion I also need to get a relative site collection url. In managed ...
0
votes
1answer
389 views

Clear all values in a multi-value lookup, via REST, SP 2010

Conditions: SP 2010, html/javascript, using REST to read/write to various lists. Im using a jquery multiselect plugin to set a multi-value lookup column. I need the selecting Groups of items, easy ...
3
votes
1answer
77 views

Using SharePoint 2013 Cross-Domain Library in a simple web page: is it possible?

I have a web page hosted on a server, say at http://SVR1/path/index.html, and I would like to access some list items in a on-premises SharePoint site hosted on another server, say at ...
0
votes
1answer
372 views

Hiding Column on a List View with Grouping

I have a list that I need to dynamically hide columns on based on user. Sort of a rudimentary Column Level security type deal. This is being done through Javascript and JQuery to simply not display ...
0
votes
1answer
18 views

Show number of active users of the site

I want to show number of active users on this site. Any idea how to get number of active users at this moment.?
1
vote
1answer
30 views

SP2013: Script editor web part not load

I am modified a document library view and try to increase width of one column. I added a script editor web part and added following: <script type="text/javascript"> $(document).ready(function() ...
0
votes
1answer
59 views

unable to get property 'getEnumerator' of undefined or null reference error

When i try to retrieve list items in sharepoint list using javascript i get the error my code <script src="/_layouts/MicrosoftAjax.js" type="text/javascript"></script> <script ...
0
votes
1answer
26 views

changing the intialprompt searchbox webpart javascript/jquery

I have a page_layout in which I plan to be used by many pages, this page layout has a searchbox webpart, at the moment it has a generic 'Search...'. However what I want is to change it so it says ...
0
votes
2answers
63 views

Edit Item Form: Call function after commit (Custom Save Button)

I have a custom Edit form in SP2013 where I want the Save button to do two things: Commit changes Call JavaScript function The function in step #2 does several things including a workflow trigger. ...
0
votes
2answers
31 views

Access to an hidden column (stock fields) with JavaScript

How can I "read" the fields of an hidden column with JavaScript? More precisely, I would like to recolor columnA fields according to columnB "Priority" fields (which is hidden in forms and not ...
0
votes
0answers
34 views

Increment integer value in list by 1

I have a sharepoint list that contains a bunch of metadata including the number of views each particular page gets. One of the requirements is to keep track of the total number of views each page ...
0
votes
1answer
407 views

How to use SPServices search sql query - getting malformed query

I am using the SPServices javascript library to make a search request to sharepoint 2010 search. I am trying this query: queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' ...
0
votes
1answer
358 views

List Onload event

What I want to do: I have a custom list that contains a lot of items. When an user loads the list, all items of his view should be checked. If there is a special value in the listitem a notifiaction ...
0
votes
1answer
620 views

Add new item to child list and refresh the parent form - multiple lookup

I've created a parent list (Vendors) and a child list (software list). There can be multiple vendors for one piece of software. I've created a custom new form with a link which opens up a modal to add ...
0
votes
1answer
25 views

Filter DataView web part using SPServices

Ok, this is the issue: I have a Data View web part which I would like to filter depending the "office" the user logged in belongs. I can get this using SPServices (GetUserProfileByName): JS ...
2
votes
0answers
98 views

SharePoint Edit Mode Javascript error in edit mode

I am not able to edit the page from the browser. I used to change and edit webparts when suddenly in the edit mode everything looks like it is locked/stalled. When I open the debugger tool, I saw a ...
1
vote
1answer
57 views

groups.getByName(groupname) is undefined

I have copied some snippets of code from here to test if a user belongs to a certain group, I am using Sharepoint 2010, however I am getting an method is undefined error. I am making sure that sp.js ...
0
votes
1answer
32 views

Difference in clientcontext.load() and clientcontext.executeQueryAsync() in javascript for SP

Please tell me the working of Load() and executeQueryAsync() in javascript for sharepoint 2013 i.e why we have to call Load() method when we have to call executeQueryAsync() .
0
votes
1answer
26 views

query a calendar not working

I am trying to query a calendar where it only returns the next event(so the item in the calendar that is closest to todays date including todays date), but I am running into some issues. It is ...
0
votes
1answer
27 views

sharepoint 2013 - reliable way to view original HTML code when in edit mode

I have JavaScript that manipulates the DOM for some of my pages. The HTML changes and stuff happens. But it would be nice, if there was a feature in SharePoint that allows us to put in HTML that we ...
1
vote
1answer
25 views

Formatting the date after outputting from list

I have outputted a date type from a list of mine like so while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); ...
0
votes
2answers
32 views

Office 365- Accessing lists refers wrong URL (URL/App name)

I'm new to NAPA tool. I started to build simple apps using NAPA tool. And I tried to access a list in office 365 site using below code. After I publish the app it shows an error message: Message: List ...
0
votes
1answer
594 views

“The XSS Auditor refused to execute a script in…” from Chrome when using <script> tag in content editor webpart

Embedding javascript in a content editor web part triggers XSS Auditor error in Chrome when editing any webpart on the page containing the content editor web part. Steps to reproduce 1 - Use newest ...
0
votes
1answer
806 views

Upload a document in a specific folder

I would like to set a specific folder when I open the upload.aspx page to help. I tryed to look in the dll but the license of reflector is expired. UPDATED Maybe this post can help ...