Transaction System API

button

button tag

This tag creates an input element of type button with the given value and other attributes. If a test directive is supplied and the directive evaluates to false, the button will not be created. For client-side validation, provide your validation function in the validate attribute. Your function must return true or false and take a single parameter, the form object. An ajax-handler is used in conjunction with file uploads. See sample for more information.

Tag Attributes
Attribute Notes
action
test
disabled
title
out-class
over-class
value Required
style
class
id
confirm
ajax-target
validate
ajax-handler
tabindex
workflow

Sample:

<c:button action="showOptions" value="Options" style="font-size:10pt;color:blue"/>
<c:button action="delete" value="Delete" class="button" confirm="Are you sure you want to delete this?"/>
<c:button action="sendForm" validate="myClientValidationFunction" value="Submit"/>
<c:button action="getResults" ajax-target="divIdForResult" value="Submit"/>

<c:button ajax-handler="myFunctionToTriggerAfterAnAjaxUpload()" value="Upload File"/>
function myFunctionToTriggerAfterAnAjaxUpload()
{
    // if this was called, it means the file was successfully uploaded to the server
    // and is waiting for me to pick it up from workflow
    // so now, I will do the ajax call to trigger the workflow.
    // if by chance I don't have a file to upload, then this function is going to be immediately
    // called when the user clicks the c:button.

    ClientPal.sendAjaxRequest("completeUpload","myOtherFunction",ClientPal.getPageForm());
        
}

function myOtherFunction(html,js)
{
    alert("File has been processed");
}

Copyright © 2006 - 2025, ContractPal, Inc. All rights reserved. API Date: May 13, 2025 07:00 AM