# inputEx-library

### inputEx 0.5.1

inputEx-library > inputEx > inputEx.widget.Button
Search:
Filters Show Private Show Protected Show Deprecated

## Class inputEx.widget.Button

Create a button

### Constructor

inputEx.widget.Button `( options )`

Parameters:
  `options <Object>` The following options are available for Button :
  - id: id of the created A element (default is auto-generated)
  - className: CSS class added to the button (default is either "inputEx-Button-Link" or "inputEx-Button-Submit-Link", depending on "type")
  - parentEl: The DOM element where we should append the button
  - type: "link", "submit-link" or "submit"
  - value: text displayed inside the button
  - disabled: Disable the button after creation
  - onClick: Custom click event handler

### Methods

#### destroy

`void destroy ( )`
Purge all event listeners and remove the component from the dom

#### disable

`void disable ( )`
Disable the button

#### enable

`void enable ( )`
Enable the button

#### initEvents

`void initEvents ( )`
attach the listeners on "click" event and create the custom events

#### render

`DOMElement render ( parentEl )`
render the button into the parent Element

Parameters:
  `parentEl <DOMElement>` The DOM element where the button should be rendered

Returns: `DOMElement`
  The created button

#### setOptions

`void setOptions ( )`
set the default options

### Events

#### clickEvent

`clickEvent ( )`
Click Event facade (YUI custom event)

#### submitEvent

`submitEvent ( )`
Submit Event facade (YUI custom event)

Copyright © 2010 Eric Abouaf All rights reserved.