]> git.joonet.de Git - adminer.git/commitdiff
Better auto-focus
authorJakub Vrana <jakub@vrana.cz>
Tue, 1 Feb 2011 15:21:10 +0000 (16:21 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 1 Feb 2011 15:21:10 +0000 (16:21 +0100)
adminer/edit.inc.php

index bd79c3c363a05a57475370a95570828e6e56d7ba..0fb61b38bd91b6fb20684a2ccc1c1de1250e782a 100644 (file)
@@ -105,7 +105,7 @@ if ($fields) {
 }
 echo ($update
        ? "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n"
-       : "<script type='text/javascript'>document.getElementById('form').elements[0].focus();</script>\n"
+       : "<script type='text/javascript'>document.getElementById('form').getElementsByTagName('td')[1].firstChild.focus();</script>\n"
 );
 ?>
 </form>