Tagged Questions

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

Anonymous Acess in Client Model (Javascript in Office 365 in Master Page)

I have the following code function retrieveListItems() { var clientContext = new SP.ClientContext.get_current(); var oList = ...
1
vote
1answer
33 views

Script Returning �

I use a lot of JavaScript in SharePoint, but today I came across a problem that I do not understand. Every time I use accents in a script such as in an alert, it returns the following strange symbol: ...
0
votes
0answers
67 views

get data form database & display in gridview's textboxes

i want to populate data in gridview's textboxes which are stored in database and if no value found in database it should show blank text boxes. BUT my problem is i am binding gridview data for Area ...
0
votes
2answers
126 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
25 views

Creating a Subsite login

Ok, I'm a newbie to Sharepoint, and I don't even know if this is possible. We have a subsite on a Sharepoint server (Office 365). This is what the bosses want: Front page of the site is this ...
0
votes
1answer
36 views

SP13: Remove Page Horizontal Scroll Bar

I have made changes to the master page on a SP13 page. An horizontal scroll bar appears at the bottom of the page. The following piece of code I have that adjusts the height of the scroll bar, but I ...
2
votes
1answer
60 views

Check if a document set exists

I'm trying to determine whether a document set exists - if it doesn't I'll send it off to another function to create but I'm not getting the correct value back from my query. I think it has to do ...
1
vote
2answers
98 views

creating custom functions in display template

<a title="_#= $htmlEncode(Srch.Res.sb_GoSearch) =#_" class="ms-srch-sb-searchLink" id="_#= $htmlEncode(searchBoxLinkId) =#_" onclick="CustomFunction();" ...
1
vote
1answer
45 views

How to get current search query in a search page

In a SharePoint 2013 publishing site, I have a custom search page. This page can be reach from the search box in the master page. It lands on : http://server/pages/search.aspx?k=myquery, which is ...
1
vote
1answer
77 views

How can I copy lookup field value to another site list in lookup filed?

How can I copy lookup field value to another site list in lookup filed? Situation, I’ve a main site list , list1 and there have lookup field from list11, I've build sub site and copy my list1 from ...
2
votes
0answers
34 views

Multilevel Audience Targeted Global Navigation SP2013

Has anyone set up Multilevel Audience Targeted Global Navigation SP2013? If I use term set I am unable to set security otherwise cannot set multilevel?
1
vote
1answer
95 views

Onchange People Picker

I have a problem changing a people picker in a custom form. Need when writing or changing the value in the people picker I know, I'm using javascript using jquery. Already tried using this code: ...
-1
votes
1answer
52 views

Add JavaScript to NewForm sharepoint list [duplicate]

I create new form with info path for sharepoint 2013 list, I need to get current week from system calendar. I have javascript to do that!! but I have no idea that where is code must be add? I open ...
0
votes
1answer
44 views

Saving content in a <div> with jQuery in SharePoint 2010

I have written a tiny bit of code that displays an information box for the users and a button to make this information box go away. I have placed the code snippet in a Content Editor webpart on the ...
0
votes
1answer
69 views

Wait async query in PreSaveAction

Can you tell me, how can i wait async query to SharePoint list in PreSaveAction() ? Is it possible? Thanks in advance!
1
vote
1answer
51 views

Opening a modal Dialog from a webpart

Im trying to open a dialog with the following code : printModal() { var options = { url: "www.hotmail.com", width: 550, height: 200 ...
0
votes
1answer
71 views

Save Modal Dialog Field Value to Refresh Page DIV

I found a couple great functions that allow me to programmatically call up a modal edit form, and they work very well. What I'm looking for is a way to update a div on the calling page with the ...
0
votes
1answer
82 views

CSR Coloured Colum

I've created a document library with some folders in it and I have added a new Column "Permission" to this Library. So now I want to color the cell or the entire row when e.g. the value "Owner" ...
0
votes
2answers
38 views

ClientWebPart.aspx does not load the Sharepoint Core.js

I have a problem with developing an app for sharepoint. While the Default.aspx works fine, the ClientWebPart.aspx does not. I load the whole SharepointJSFiles with <SharePoint:ScriptLink ...
1
vote
1answer
75 views

Retrieve Fields/Column Names of a Sharepoint List using Javascript

<script type="text/javascript"> function retrieveFieldsOfListView(){ var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); var list = ...
2
votes
1answer
34 views

Accepted way of checking for SharePoint CSOM in JavaScript?

What I'm trying to do is build a dual purpose JavaScript that might run inside or outside of SharePoint, so I need something like this: if(SharePoint CSOM Exists) { //Do a bunch of stuff involving ...
0
votes
1answer
43 views

How do I get the immediate child items in a List with javascript and SP.Service?

I am making use of an SP.Service to retrieve the items of a particular list (Site Assets). I know the way to retrieve all the items under the list: using a caml query and the function ...
0
votes
0answers
23 views

Upload Status Indicator Web Part

Being an SharePoint Admin and not a Developer how would I accomplish the following: A client access a site where they are able to download and upload documents. The business requirement is to create ...
0
votes
1answer
79 views

Moving Scroll Bar to Top not working in SharePoint 2013

We are using below code on our web application master pages inside SharePoint 2003 to make scroll bar position always on top. function MoveUp() { if ...
0
votes
1answer
133 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
22 views

How to create a verticle cascading menus in sharepoint

Can anybody suggest a code to create a verticle cascading dropdown lists in sharepoint using content editor?
1
vote
2answers
54 views

Can't get jquery to work

I can get this block of jquery to work on basic HTML in Codepen However, it doesn't seem to be working when I try this on a SharePoint 2013 Publishing site. I embedded the CSS and JQ in my master ...
1
vote
1answer
54 views

Uncaught Error: The property or field has not been initialized

I am trying to run the following code in a simple sharepoint app, but I got this error: Uncaught Error: The property or field has not been initialized. It has not been requested or the request has ...
0
votes
0answers
107 views

ECMAScript is not working in SharePoint 2013 content editor webpart

ECMAScript is not working in SharePoint 2013 content editor web-part.Please let me know issue in the below code. <script src="http://code.jquery.com/jquery-1.9.1.js" ...
0
votes
2answers
227 views

Failed to load resource: the server responded with a status of 406 (Not Acceptable) when my REST api call

Failed to load resource: the server responded with a status of 406 (Not Acceptable) when my REST api call works in site. But when I enter the REST url in browser it returns the result. So nothing ...
0
votes
1answer
37 views

How do I get the url pointing to a document library?

I am trying to retrieve all document libraries in a site collection using an SP.Service and place them in a container with their correspondent url pointing to the internal library. So far I have ...
0
votes
1answer
33 views

Ecmascript to read specific custom properties of library and based on the property value delete the item

ECMAScript to read specific custom properties of library and based on the property value delete the item. var itemId = 43; function filldata() { var clientContext = ...
1
vote
1answer
60 views

Is there an “onLoad” equivalent for ajax web parts?

I need to run some jQuery (some formatting clean-up) against the output of an OOTB list which is loaded and refreshed with ajax. The problem is that the list doesn't render until well after jQuery's ...
1
vote
3answers
162 views

Days Past Since List Item Created - SharePoint Online 2013

I would like to make a column that shows how old a list item is. Since the calculated value [Today] isn't supported I need to come up with another way to subtract date created with the current date. ...
0
votes
0answers
45 views

How to set default sharepoint:formfield value without using javascript

Trying to customise a list form. Is it possible to initialise the "ObjectName" field to a value passed in the query string without using javascript? Thanks.
3
votes
1answer
166 views

How do you properly write to a managed metadata column from JSOM? (SharePoint 2013)

I am trying to write the value of a managed metadata column across several documents in a document library at once using JSOM, but for some reason the way I'm trying only writes the value to the first ...
2
votes
1answer
111 views

Add custom action to sharepoint ribbon button

In my SharePoint view have export excel ribbon, this is ribbon of SP standard. When click to this ribbon, I want to prompt a confirm dialog with javascript before export. If user click OK on this ...
0
votes
1answer
43 views

Changing a custom content type's icon, possibly with javascript

I have a document library with multiple cusotom content types derived from "Document Set". They all show up with the same icon in a general list view. Here's what I would like to do: I'd like to ...
0
votes
1answer
52 views

Script Enter key do the same thing as Search Button

I have a search box which filter Data from Sharepoint list developped with Javascript, here is the code : <script type="text/javascript"> function RedirectUrl(){var tb = ...
0
votes
2answers
62 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 ...
1
vote
3answers
136 views

What is the correct way to reference javascript in Sharepoint 2013?

I have found conflicting sources on linking/referencing JavaScript to a SharePoint .HTML Masterpage in SP2013. Out of the box, SP2013 instructions from Design Manager interface are to Use this ...
1
vote
1answer
70 views

How To “Add New Item” On Quick Launch & Refresh Page

On a SharePoint 2010 site how can I create an "Add New Item" link to the quick launch that will refresh the parent page when the new item is submitted? I have used the following snippet to create the ...
2
votes
1answer
30 views

How can you share script members between control template and item template

I'm developing two custom display templates (Control and Item template) and I'm wondering if it is possible to share script members between these two templates, e.g. if I add something like var bar = ...
1
vote
0answers
26 views

Create folder inside site assets

How can i create a folder inside site assets from a app? Here is my code, it says that folder item is undefined. var hostUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl")); var ...
1
vote
1answer
37 views

how can I http POST to libraries with SP 2010's REST API?

SP 2010's REST api documentation cites an example that uses a list, whereas I wish to rely on a library (for example, "SharedDocuments"), because a standard named library already exists in every ...
1
vote
2answers
287 views

How to pass parameter from modal popup to parent window

I have a parent window which is a Display page of a list item. This page comes as a result of some redirection with custom querystring parameters to it. one of the querystring parameter is ...
0
votes
1answer
37 views

client context with userproperties and a list

I am trying to use a client context and load in userproperties and a list in the same success method. However I am having a problem as I get an error saying my listitems are undefined. Here is my code ...
0
votes
0answers
151 views

Bind Custom List to Gridview using javascript in sharepoint designer

This is my javascript code to bind <script type="text/javascript"> function BindGridView() { $.ajax({ type: "POST", url: "AllItems.aspx/PPB", data: "{}", contentType: ...
1
vote
1answer
45 views

SharePoint 2013 Custom Ribbon Action inside Custom Group

I am trying to make a Custom Ribbon Action within Visual Studio. This works perfectly fine but I would like the Custom Action to reside in a custom group. I've seen lots of helpful(ish) threads/videos ...
0
votes
1answer
27 views

access the contents of a sharepoint list and update it

My problem is how to access the contents of a sharepoint list and update the contents by a button "Save" of another list that it have the same field. I'm working in sharepoint online using ...