Click or drag to resize
Button

Creates a button linked to a javascript action; it can either be a text button or an image.

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

id

XPath attribute defining the id of the button

icon

if set, the button will be an img tag with the value of this XPath attribute as src

text

XPath attribute; if the icon attribute is set, sets the alt of the img; if not, sets the text of the button

enabled

true or false; if false, the action is not called on click

action

XPath attribute defining the javascript code to call on click

Child elements

None.

Parent elements

Element

Description

any xhtml or xsl tag

Styling information

The XHTML structure created by the acs:Button is the following:

<!-- if @icon is set -->
<img src="{@icon}" class="button [disabled]" alt="{@text}" title="{@text}"/>
<!-- if @icon is not set -->
<span class="button [disabled]">@text</span>
Examples
<acs:Button id="edit_thingy_{ID}" action="editThingy({ID})" icon="{$root}edit.png" text="Edit this thingy"/>