Bug 237 : focus sur le quick search
authorPascal Corpet <pascal.corpet@m4x.org>
Fri, 7 Jan 2005 11:18:06 +0000 (11:18 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:12 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-228

templates/search.quick.form.tpl

index 6619767..54f6e04 100644 (file)
 
 <br />
 
+{literal}
+<script type="text/javascript">
+  <!--
+  // Activate the first search input field.
+  var nodes = document.getElementsByTagName('input');
+  for(var i=0; i<nodes.length; i++) {
+    node = nodes[i];
+    if(node.name == 'quick') {
+      node.focus();
+      break;
+    }
+  }
+  // -->
+</script>
+{/literal}
 {* vim:set et sw=2 sts=2 sws=2: *}