Tag Info

Hot answers tagged

3

this function set field limit characters: function setFieldLimitCharacters( field, limit ) { field.unbind( 'keyup change input paste' ).bind( 'keyup change input paste',function(e){ if( $( this ).val().length > limit ) { $( this ).val( $( this ).val().substring( 0, limit ) ); } }); } usage: ...


2

First thing I want to mention here is the use of list for just 1 item. This is not the way to go. You can use site properties (property bag values) to manage this situation. You can create 3 properties and update values to it. It will save storage and improve performances. You can find in this article how to query property bag values using JavaScript CSOM ...


2

The script will never make it to the client because of the redirect. You either need to send the script with the alert and then postback to perform the redirect (yuck) or perform the redirect in the script by doing a location.replace to the URL you want to redirect to...you could also set location.href to the URL as well. So you could do something like ...


1

These methods registers and adds the script block to the page. So it will fire after the page is rendered from the server. In your case you are redirecting to some other page while the script is registered on the previous page. So it would not fire on the previous page.


1

Your problem can be solved via JsLink as well as overriding methods from the sp.ui.discussions.js file under the layouts hive. And about maintenability, this file is easy to maintain because you only change the text of the variable "NewDiscussionTitle" var newDiscussionTitle = "Your Custom New Text "; SP.UI.Discussions.HeaderBehavior.prototype.render = ...


1

Preface, tried this on SP2010 not 2013: Something you can try is creating a new content type that inherits from the Discussion content type. Then in your discussion list, go to the list settings and add your newly created content type and delete the discussion content type. When selecting to create a new item, the content type name will be present. Then ...


1

This is a broad question and there are multiple ways to approach it. First, you need to decide where to get the "associated information". If it's just a couple fields, you could consider loading it within the data view. If it is a bigger chunk (e.g. includes images), then you'll load it on demand with an AJAX call when the user selects an item. [Edit] ...


1

You will need to use CSOM-JS. Refer to this: http://stackoverflow.com/questions/2767461/sharepoint-form-webpart-with-javascript on how your html form should look like and this on how to do basic JS operations in SharePoint 2013: https://msdn.microsoft.com/en-us/library/office/jj163201.aspx (SharePoint 2010: ...


1

Check out this threads. http://spjsblog.com/2012/02/24/form-field-tooltip-for-sharepoint-2007-and-sharepoint-2010/ You'll have to modify add/new/edit forms of the list or document library you are working with. Then you can use any of the numerous tooltip js libraries i.e. http://jqueryui.com/tooltip/ to add tooltips to your form.


1

REST /_api/Web/SiteUsers JSOM var ctx = SP.ClientContext.get_current(); var users = ctx.get_web().get_siteUsers(); ctx.load(users); ctx.executeQueryAsync(function() { var userArray = []; var e = users.getEnumerator(); while (e.moveNext()) { userArray.push(e.get_current()); } console.log(userArray); });


1

Modules are used to deploy files to SharePoint Content Database. They can't deploy a file to physical folder. When you add a mapped folder like layouts to SharePoint VS Projects, the files inside the mapped folder automatically get deployed to physical path.


1

Try this code $(document).ready(function(){ $().SPServices({ operation: "GetListItems", listName: "Project review", webUrl: "/internal/", async: false, CAMLQuery: "<Query><Where><Gt><FieldRef Name='Id'/><Value Type='Number'>0</Value></Gt></Where></Query>", ...


1

You can edit the page layout in SharePoint designer and then add the available fields using the Toolbox


1

I think the issue is the value your retriving is not getting it at the correct moment first time round. Thats why on the second postback it would get the correct item value and its loaded within the context properly. have you tried calling the method out of the page load event? so at bottom code just do showStatusAlert(); instead. or use this method ...


1

If your form is hosted inn SharePoint, You can use server object model for this But as per your query you can trying to host the page in your asp.net web forms application, so for this you can use client object model: Use following method to upload document: public void UploadDocument(string siteURL, string documentListName, string documentListURL, string ...


1

SharePoint 2013/SharePoint Online In .NET Framework 4 was introduced ClientIDMode property that specifies how ASP.NET generates the ClientID for a control that can be accessed in client script. To summarize, since SharePoint 2013 targets .NET Framework 4, ClientIDMode could be utilized that simplifies the access of control in the client side as ...


1

I did that before, but it was for Sharepoint 2010 (see my blog post). The code I used is the one below. It must be inserted into your masterpage, just before the </head> tag : <script type="text/javascript"> function DefaultUploadOverwriteOff() { if (document.title.indexOf("Upload Document") > -1) { var ...


1

DataFormWebPart.ViewFlags property gets or sets the type of content to be displayed by the DataFormWebPart. The DataFormWebPart.ViewFlags property return type is SPViewFlags enumeration that describes the view type of a Web Part: [System.Flags] [SubsetCallableType] public enum SPViewFlags : long { None = 0L, Html = 1L, ClientModified = 2L, ...



Only top voted, non community-wiki answers of a minimum length are eligible