Tag Archives: Javascript

How to implement Validation to require Attachments in a SharePoint List Item creation in SharePoint 2013 using Client-side Rendering – José Quinto

One of the best improvements in SharePoint 2013 is JSLink or Client-side Rendering, because you can override the OOTB behavior of SharePoint Fields, Views, Items, New Form, Edit Form, View Form, etc.   In this case we’re going to implement attachment required validation in one SharePoint List.     [crayon-587744893d678532341487/]   References: – https://social.technet.microsoft.com/Forums/sharepoint/en-US/ef5fee21-03c7-404e-a73b-a452d4a06c47/add-attachment-field-to-post-list-in-sharepoint-2013?forum=sharepointgeneral – … Read More →

Source: How to implement Validation to require Attachments in a SharePoint List Item creation in SharePoint 2013 using Client-side Rendering – José Quinto

Advertisements

Handling field values in JSLink | Stefan Bauer – n8d

In this blog post I try to cover all the aspects around field values used in JSLink overrides.

Source: Handling field values in JSLink | Stefan Bauer – n8d

JSLink and Display Templates Part 1 – Overview, URL Tokens and Applying JSLink to objects | Martin Hatch – SharePoint Evangelist

Source: JSLink and Display Templates Part 1 – Overview, URL Tokens and Applying JSLink to objects | Martin Hatch – SharePoint Evangelist

ASP.NET–prevent button from form submit based on condition in javascript

Here is a javascript function that retutns true or false based on wheather a listbox is empty (select element in html does not have any option elements)

function WarnIfCleanersListboxEmpty() {
    if ($('#lboxCleaners').children().length == 0) {
        alert('list is empty');
        return false;
    } 
    return true;
}

in ASP.NET page there is a button that submits the form

 <asp:Button ID="btnGenerate" runat="server" Text="Generuj" OnClientClick="return WarnIfCleanersListboxEmpty()"/>

it’s the return in OnClientClick that I always forget and then wander why the form gets submitted even if my javascript function evaluates to false.

WRONG: OnClientClick=”WarnIfCleanersListboxEmpty()”

RIGHT: OnClientClick=”return WarnIfCleanersListboxEmpty()”

smsagent

Tips, tricks and time-savers for the Windows and ConfigMgr administrator

To The Point

Anything about Technology and Business

Brian's Power Windows Blog

Microsoft in the Enterprise. Windows, Hyper-V, Exchange, SQL, and more!

PowerScripting Podcast

Shownotes and links for the PowerScripting Podcast, a podcast to help people learn Windows Powershell

Learn Powershell | Achieve More

What is this Powershell of which you speak?