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

Openning two javascript:OpenPopUpPage dialogs at the sametime

I have added a script editor inside my team site, that contains two links to show pop-ups dialogs as follow:- <li unselectable="on"><a ...
1
vote
1answer
4k views

The property or Field not initialized exception even I request explicitly

I'm using the following code to get the user permissions on a list item in javascript csom context = SP.ClientContext.get_current(); var field = ...
0
votes
2answers
335 views

Using JavaScript to redirect a page

I am using JavaScript to redirect users who aren't owners to a different page. I am using $(document).ready(function() { //check owner status if(!isOwner) { ...
2
votes
1answer
723 views

Save Item Success Message using JS

I would like a success message to show when updating (NOT CREATING) a list item in a custom sharepoint list. Is there a quick and dirty way of doing this using JS? I would like to avoid VS development ...
0
votes
2answers
95 views

Client Side Object model code goes in onFailure function

I am using the client side object model to approve multiple items from the form library. I need to access the values of some of the columns of the form library. The following is my code: var ...
0
votes
1answer
155 views

Editing SPO 2013 Master Pages - no effect and where do you place javascript code block?

I'm trying to add a jQueryt block to oslo master page on spo 2013. check out, make changes and save, but no apparent impact. Am I placing javascript in the wrong place? do I need to do any additional ...
0
votes
0answers
61 views

field 'choices' not initialized not requested

Hi im using the following code to get choices of a Choice site column. some times Im getting 'Chices' not initialized error in console. var searchtaxonomy_context = SP.ClientContext.get_current(); ...
0
votes
1answer
308 views

loading multiple files from custom action with SP.ClientContext

I made a custom action that calls GetSelectedListItemAsString(). it should load the files 1 by 1 but somehow it does not load the files can somebody help me with it underneat a code snippet of the ...
0
votes
2answers
109 views

Can't read Start or End Times with Client Object Model from Calendar in SP 2013

I have some experience using the SharePoint Client Object Model to retrieve text fields and URLs/images from lists in SP 2013. I'm currently trying to do something similar with a calendar. I have been ...
0
votes
1answer
129 views

Loading ECMA script API / Access sharepoint from web site hosted externally from sharepoint

I'm developing a web application externally from sharepoint online 2010. As part of the application I would like to allow users to access documents from a document library. Ideally users would click ...
0
votes
1answer
145 views

IIS 401 errors getting custom master page css and js

Environment: 2013 Enterprise, single WFE, full control of environment I'm building a custom master page for a SP site collection using a very basic setup. It's a simple responsive HTML page using ...
2
votes
1answer
147 views

Add content to the editor

I've developed a ribbon button to Sharepoint inside Media tab. This opens a dialog where I list loads of content. On click I'm calling a function to close the dialog and it is supposed to insert some ...
1
vote
1answer
4k views

ExecuteOrDelayUntilScriptLoaded with sp.js when in debug mode Object Expected

I currently have a JavaScript file that gets loaded in my SharePoint pages. jQuery(document).ready(function() { ExecuteOrDelayUntilScriptLoaded(myfunction(), "sp.js"); }); myfunction = function(){ ...
0
votes
4answers
3k views

Referncing a java script inside my master page will not fire

I have added the following to my seatle.master page inside my SharePoint server 2013 :- <SharePoint:ScriptLink language="javascript" name="custom.js" OnDemand="true" runat="server" ...
0
votes
1answer
491 views

How to add a javascript to my seatle.master

i am working on a team site inside my SharePoint server 2013. I need to add a Java script code to my master page , so that the script will be available to all my SharePoint web pages. but i can not ...
0
votes
0answers
133 views

Create Field and Content Type in Host Web

I have tried to provision fields and contenttypes to the hostweb but with no success. This is the code to provision the field: $.ajax( { url: appweburl + ...
0
votes
1answer
222 views

How to show a javascript alert and close the browser tab on button click [closed]

I have a web part with button that is clicked upon approval of a workflow. I want to add a JavaScript alert after performing all the button click c# code and then upon closing the alert the browser ...
1
vote
2answers
248 views

Javascript Object Model; possible to return whether item has permissions under inheritence or not?

So if I am using the COM/JSOM, and normal GetListItem, can is there something I can add to the Include method, that will allow me to see if the item returned has permissions under default inheritance ...
2
votes
1answer
744 views

Displaying the sharepoint server date and time under the username

I am trying to display the server date and time under the username inside my SharePoint 2013 server. I did the following :- On the master page I added the following “currentdate” Div :- ...
0
votes
1answer
106 views

Current user doesn't change in webservice after another user signs in

The context: I have this web service hosted in SharePoint. [ServiceContract] public interface IUserService { [WebInvoke(UriTemplate = "/GetCurrentUser", Method = "GET", BodyStyle = ...
1
vote
2answers
1k views

Question about adding javascript:OpenPopUpPage to my SharePoint sites

I have the following problems with showing javascript pop up page I have added a content editor web part inside my team site, then I insert an embedded code snippet with the following code:- <a ...
2
votes
3answers
506 views

How to convert date format in json response to string format in sharepoint?

I have set a column to column type "Date" and the json response from listData.svc for this column is in this format "Created": "/Date(1377683175000)/" , can someone suggest how to convert this format ...
4
votes
4answers
5k views

Add Javascript to every page in Sharepoint 2013

I looked but from what I see most questions that have anything to do with this refer to an old version of Sharepoint where something is always different from what I see in SP2013. I basically just ...
1
vote
0answers
436 views

How to filter a list view by SP group membership (CAML, JS, anything)

I have a list. I need to filter the list view in SharePoint to show items: created by someone in current user's group show all to admin group I am using Infopath for the list's form view, and ...
0
votes
1answer
76 views

How many files can I link in the CEWP

I have a CEWP which contains HTML button and JS for functionality. The html editor of the cewp keeps removing certain links from my code and I'd rather just link to the source file. How do I link to a ...
1
vote
2answers
936 views

How to get specific fields in json response from REST api of sharepoint 2010?

I have used angularjs to query for data through listData.svc. A json response is returned. May someone suggest how to get the value of a specific field with javascript?
0
votes
1answer
94 views

Show/Hide button based on User Email. Error: Unexpected identifier

I have a JavaScript which I use to hide or show a button based on the logged in user. Button: <a id="customAddNew" ...
0
votes
1answer
594 views

SPServices - GetRolesAndPermissionsForCurrentUser

I have a list where one group of users is not allowed to delete items but they have view and edit permissions. All items in the list contain an attachment. However, users are not allowed to delete the ...
2
votes
1answer
313 views

Calloutpopup starts working after second click

I am testing callout popup and its giving me very strage behaviour. Its working but only after second click. on first click its not working. function divTestCallOutPopup_click(sender, args) { ...
1
vote
1answer
698 views

SharePoint 2013 - How to add an action to a Callout

I want to add a custom action on the default Callout for Document Libraries. The only instructions I could find on this subject show how to override the entire FooterTemplate on an existing Callout ...
0
votes
1answer
73 views

Client Object Model, wait for a list to load

I'm writing some javascript that modifies a SharePoint list, I've added it to the page using JSLink. Sometimes the script fails because the list appears not to have fully loaded. If I add an alert ...
0
votes
0answers
429 views

Modal dialog for document library

First of all, my question. How do I make a working modal dialog popup for a document library, that shows details about that document upon clicking the document name in the library list? Please note ...
2
votes
2answers
5k views

What is the proper way to add custom CSS/JavaScript SharePoint 2013 site?

I would like to tweak the default layout in SharePoint, e.g. add... .ms-number { white-space: nowrap; } ... to all pages. I know it is possible to modify a master page directly, but is it the ...
1
vote
1answer
485 views

How to embed javascript code in a page using Powershell?

I have a powershell script that creates article pages in a publishing portal site collection. As part of that script I insert the content for each page by setting the value of the $item["Page ...
1
vote
1answer
238 views

A script on this page may be busy, or It may have stopped responding

there is one webpart on page that rotate the images so i added a jquery to rotate images and its working fine but after sometime it gives error like A script on this page may be busy, or It may have ...
1
vote
1answer
61 views

Custom script not loading for user groups

I have a script that adds an RSS-button to my discussion list. This script is added to the masterpage (seattle.html) as a ScriptLink. If I or one of my colleagues who have full access to the ...
0
votes
1answer
617 views

Freeze Header Row

is it possible to freeze the header row in list? We add some code so the user can scroll trough the content. The code doesn't work for the header freeze. We work with Internet Explorer 10. Have ...
0
votes
1answer
697 views

Creating modal dialog for adding item to list from another page

I'm trying to write web-part for viewing list items. It contains link "add new item". I should create modal dialog for adding item, and it must work from every page. So, I have JS for modal: ...
0
votes
0answers
249 views

Update/Save list item edits without closing editform

I am working with a customised list 'editform' and would like to give my users the ability to save their edits without the editform closing, which is the default SP 'Save' behaviour. I have linked ...
1
vote
1answer
2k views

How to get the return username using javascript? [duplicate]

I am trying to store the username return by the variable username using the code below, but it seems nothing is returned (Username:undefined pops up), may somebody advise how to make it works? var ...
0
votes
1answer
121 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
100 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 ...
3
votes
5answers
3k 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 ...
0
votes
0answers
106 views

Show multiline field if specific select option selected

I'm trying to create a Note box to show up when an items status is set to cancelled. What I'm noticing in the html is that within a form, switching between options does change the html until saved. ...
4
votes
1answer
183 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
925 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 ...
6
votes
3answers
487 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 ...
0
votes
1answer
230 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. ...
0
votes
1answer
701 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
229 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 ...