[Phplib-trackers] [ phplib-Patches-467594 ] Class of_button for oohforms
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2001-10-03 19:19:27
|
Patches item #467594, was opened at 2001-10-03 12:19 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403613&aid=467594&group_id=31885 Category: Widget (example) Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jens S. Benecke (jensb) Assigned to: Nobody/Anonymous (nobody) Summary: Class of_button for oohforms Initial Comment: Hi, I need non-submit buttons (for Javascript actions) and this is the extension for the oohforms class: It's basically nothing but a copy of of_submit, where the "submit" string is changed to "button". But it works for me and I think it's useable. If somebody has a cleaner approach, well, then go ahead :-) -------------------------------------------------- class of_button extends of_element { var $src; function of_button($a) { $this->setup_element($a); } function self_get($val, $which, &$count) { $str = ""; $sv = empty($val) ? $this->value : $val; $str .= "<input name='$this->name' value='$sv'"; if ($this->src) $str .= " type='image' src='$this->src'"; else $str .= " type='button'"; if ($this->extrahtml) $str .= " $this->extrahtml"; $str .= ">"; return $str; } function self_load_defaults($val) { // BUTTON will not change its value } } // end BUTTON --------------------------------------------------- ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403613&aid=467594&group_id=31885 |