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

Unable to pass xslt variable in the javascript function

I have added an icon before the image title in asset library. I want to pass the name of the current logged in user and the image title in the JavaScript function to add it in other custom list. My ...
0
votes
0answers
111 views

Retrieving specific div from a wiki page on ajax call

I am trying to retrieve a specific div content through ajax call from a wiki page and then I need to use it in a web part page. The problem I am facing is that if I use this $.ajax({ ...
2
votes
1answer
209 views

Custom Action in user dropdown

Im trying to implement a custom action in the logged in user dropdown (when you click 'sp_admin' in the image below). The custom action should be a text called "Switch user", which when clicked ...
0
votes
0answers
206 views

javascript:OpenPopUpPage will close automatically on safari web browser

I have the following code to display a pop-up window:- <li class="ms-comm-adminLinksListItem" unselectable="on"> <a ...
0
votes
1answer
362 views

CAML Join for retrieving FieldLeafRef

I'va a custom list which contains a lookup field to a document library. Now I need to retrieve all items from this list with the corresponding file name from the document library with Javascript CSOM. ...
0
votes
1answer
461 views

How to decide which link is clicked from list item using javascript?

I have inserted an image (with <a> tag) like "Add to cart" before the title of list item using SP Designer. Now I want to check that which item's link is clicked using java script. How to do ...
0
votes
2answers
76 views

How to change the Ribbon.calender colour from green to blue

Blue is our official colour, and the higher management mentioned that all the colours should be blue. So for my Ribbon Calendar the upper boarder will be green as follow:- So is there a way to ...
0
votes
1answer
157 views

Sharepoint javascript:OpenPopUpPage Is not being displayed well on Safari and Chrome

I have added and code snippet to my team site home page to display a pop up when clicking on a link:- <li class="ms-comm-adminLinksListItem" unselectable="on"><a ...
0
votes
0answers
30 views

CreateChildControls() + Javascript

I want to use javascript to customize my custom properties. Like hiding textboxes and using javascript to generate new textboxes and so on. I just can't get javascript to work with ...
0
votes
1answer
392 views

Removing Fellow & Sync buttons using javaScript worked well, while it will fail to hide the share Button

I have wrote the following three scripts at the end of my master page, to remove the Fellow,Sync and Share buttons:- <script type= "text/javascript"> ...
0
votes
0answers
42 views

Add content to Web Part from Modal

I'm showing a button, when editing the web part, so the user can click and a modal popups up. This modal should have a couple of option, doesn't matter now, but then I want to save the content so that ...
1
vote
1answer
1k views

Update list column using client object model code in SharePoint 2013 goes in onFailure without giving errors

I am using javascript to write the client object model code in SharePoint 2013. I want to update a column of the form library but I am not able to do it. The code goes in the onFailure method without ...
1
vote
0answers
74 views

Update CEWP without refreshing page

I have a webpart which contains 3 charts. The charts are built using google's chart API and SPJS Chart The problem I face is that I'm trying to get the charts to seamlessly update as the list gets ...
0
votes
0answers
105 views

Ooyala Embedded Video and SharePoint 2010

I'm having issues embedding a video from a local news channel's website into an article page on SharePoint 2010; the code I've been trying to embed was copied from the "Embed" tab of the video ...
0
votes
1answer
82 views

Custom newfrom (upload a picture and fill in the picture url)

I have to customize an announcement list new and edit form. In the form is there is a Picture Colum. But I don’t want the user to go first to a picture library, upload the picture, copy the picture ...
0
votes
1answer
228 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
339 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
753 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
156 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
62 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
322 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
146 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
148 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
504 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
137 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
223 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
254 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
753 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
109 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
511 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
441 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
77 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
955 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
601 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
322 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
725 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
74 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
431 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
6k 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
499 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
253 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 ...