Code

Focus for login window.
[gosa.git] / html / index.php
index c33e7bbcd51c8dd10d7c658ff7ef9b39166db3a0..4ace274aa5653e116629c7174fbd5f39069dffca 100644 (file)
@@ -380,6 +380,12 @@ if ($error_collector != ""){
 }
 displayLogin();
 
+/* Set focus to the error button if we've an error message */
+if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
+  echo '<script language="JavaScript" type="text/javascript">';
+  echo 'document.forms[0].error_accept.focus();';
+  echo '</script>';
+}
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>