User Manual
Graphics Builder
Pane tools
5
106 | 196
A6V11604297_en--_e
Type
Button type
Specifies the type of button. Options are:
● button, a clickable button
● reset, resets the form data to initial values
● submit, submits form data
Default: No selection
Value
Initial value
Specifies an initial value for the button in a form.
Default: Field is blank
Table 33: BUTTON attributes.
Creating a button that displays a JavaScript alert dialog box and switches the button’s text
This procedure uses the PROPERTIES and COMPONENTS panes.
1. From the COMPONENTS > HTML COMPONENTS pane, drag-and-drop onto the work area and
then select it.
2. Enter On in the Label attribute field of the BASIC PROPERTIES pane.
3. Right-click on the BUTTON component and select CREATE EVENT > MOUSE > MOUSE CLICK.
4. Paste the following code into the SCRIPT EDITOR and click SAVE.
var buttonText = this.textContent;
if(buttonText == 'On')
{
this.textContent = 'Off';
}
else{
this.textContent = 'On';
}
alert('Toggling button to "' + this.textContent + '".');
5. Click PREVIEW in the upper right corner and click the BUTTON component to test it.