apply filter when enter is pressed in filter box

This commit is contained in:
Roland Gruber 2008-03-21 15:33:25 +00:00
parent e123469762
commit d8f9d405cd
2 changed files with 8 additions and 1 deletions

View File

@ -398,7 +398,7 @@ class lamList {
$value = " value=\"" . $_POST["filter" . strtolower($this->attrArray[$k])] . "\""; $value = " value=\"" . $_POST["filter" . strtolower($this->attrArray[$k])] . "\"";
} }
echo "<td>"; echo "<td>";
echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($this->attrArray[$k]) ."\"" . $value . ">"); echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($this->attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event)\">");
echo "</td>\n"; echo "</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";

View File

@ -56,3 +56,10 @@ function listOUchanged(type) {
selectOU = document.getElementsByName('suffix')[0]; selectOU = document.getElementsByName('suffix')[0];
location.href='list.php?type=' + type + '&suffix=' + selectOU.options[selectOU.selectedIndex].value; location.href='list.php?type=' + type + '&suffix=' + selectOU.options[selectOU.selectedIndex].value;
} }
function SubmitForm(id, e) {
if (e.keyCode == 13) {
document.getElementsByName(id)[0].click();
return false;
}
}