function _AdvisingScreen::draw_button

4.x _AdvisingScreen.php _AdvisingScreen::draw_button($title, $on_click, $bool_padd = true, $style = "")
5.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 1639

Class

_AdvisingScreen

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 ($this->page_is_mobile) {
    $on_mouse = ""; // Causes problems for some mobile devices.
  }

  if ($bool_padd) 
   {
    $padd = "   ";
  }


  $rtn = "<span class='gradbutton hand' onClick='$on_click' $on_mouse $style >
				$padd $title $padd
				</span>

			";
  return $rtn;
}