Class button

Description

A standard button for a form. Does nothing unless you define an onclick event handler for it.

Located in /button-defs.php (line 129)

button_object
   |
   --button
Direct descendents
Class Description
 class image_button Image button.
 class hover_button Hover button.
 class submit_button Submit button
 class reset_button Reset button A standard form reset button appearing as the standard grey widget.
Variable Summary
 mixed $accesskey
 mixed $onclick
Method Summary
 button button (string $action, [string $label = ""], [string $parms = ""], [string $onclick = ""], [string $accesskey = ""])
 string html ()
 void set_confirmation (string $conf)
 void set_onclick (string $onclick)
Variables
mixed $accesskey = "" (line 133)

Speed-key associated with button (ALT-<key>)

mixed $confirmation = "" (line 135)

Confirmation text for onclick

mixed $onclick = "" (line 131)

Script to be executed onclick

Methods
Constructor button (line 147)

Constructor Create a button object. Sets basic button attributes.

  • see: button_object
button button (string $action, [string $label = ""], [string $parms = ""], [string $onclick = ""], [string $accesskey = ""])
  • string $action: The name of the form control
  • string $label: The text label for std HTML buttons
  • string $parms: Special parameter string (RugbyLive)
  • string $onclick: Javascript code to execute onclick
  • string $accesskey: Speed-key to assoicate with button
html (line 193)

Use render() to render this element in your page.

Renders the button as HTML.

  • return: HTML rendering of button
  • see: render()
string html ()

Redefined in descendants as:
set_confirmation (line 181)

Sets parameter string associated with the button.

Sets the confirm text to use when this button is clicked. This is a way of, for example, dealing with warnings for record delete. NOTE: This is only applicable with the rugbyvu STD framework.

void set_confirmation (string $conf)
  • string $conf: Confirmation text for Javascript popup
set_onclick (line 159)

Sets parameter string associated with the button.

Sets the onclick script to execute when the button is clicked.

void set_onclick (string $onclick)
  • string $onclick: Javascript code to execute onclick

Documentation generated by phpDocumentor 1.3.0RC3