From de824adfa7805ab035d68d712d00366b0bfb7d32 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 8 Oct 2012 18:01:55 +0000 Subject: [PATCH] use more metaHTML --- lam/lib/html.inc | 24 +++++++++++++++---- lam/lib/lists.inc | 60 +++++++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 32 deletions(-) diff --git a/lam/lib/html.inc b/lam/lib/html.inc index fb123646..7e17862f 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -368,6 +368,8 @@ class htmlInputField extends htmlElement { private $fieldSize = 30; /** field max length (default 255) */ private $fieldMaxLength = 255; + /** on keypress event */ + private $onKeyPress = null; /** password field */ private $isPassword = false; /** enabled or disabled */ @@ -458,7 +460,11 @@ class htmlInputField extends htmlElement { if (!$this->isEnabled) { $disabled = ' disabled'; } - echo ''; + $onKeyPress = ''; + if ($this->onKeyPress != null) { + $onKeyPress = ' onkeypress="' . $this->onKeyPress . '"'; + } + echo ''; // autocompletion if ($this->autocomplete) { echo "