function AdvisingScreen::draw_button
Search API
7.x AdvisingScreen.php | AdvisingScreen::draw_button($title, $on_click, $bool_padd = true, $style = "") |
6.x AdvisingScreen.php | AdvisingScreen::draw_button($title, $on_click, $bool_padd = true, $style = "") |
Returns the HTML to draw a pretty button.
Parameters
string $title:
string $on_click:
bool $bool_padd:
string $style:
Return value
string
File
- classes/
AdvisingScreen.php, line 2322
Class
Code
function draw_button($title, $on_click, $bool_padd = true, $style = "")
{
// Style is expected to look like:
// style='some:thing;'
// with SINGLE apostrophes! not quotes.
$on_mouse = "onmouseover='this.className=\"gradbutton gradbutton_hover hand\";'
onmouseout='this.className=\"gradbutton hand\";'
onmousedown='this.className=\"gradbutton gradbutton_down hand\";'
onmouseup='this.className=\"gradbutton gradbutton_hover hand\";'
";
if ($bool_padd)
{
$padd = " ";
}
$rtn = "<span class='gradbutton hand' onClick='$on_click' $on_mouse $style >
$padd $title $padd
</span>
";
return $rtn;
}