diff --git a/lib/formslib.php b/lib/formslib.php index a32fa302a49..a0db43a4174 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -2221,7 +2221,7 @@ function validate_' . $this->_formName . '_' . $escapedElementName . '(element) ret = validate_' . $this->_formName . '_' . $escapedElementName.'(frm.elements[\''.$elementName.'\']) && ret; if (!ret && !first_focus) { first_focus = true; - frm.elements[\'id_error_'.$elementName.'\'].focus(); + document.getElementById(\'id_error_'.$elementName.'\').focus(); } ';