Update of /var/cvs/contributions/didactor2/src/core/metainf/tags/di/core
In directory james.mmbase.org:/tmp/cvs-serv6418
Modified Files:
head.tagx
Log Message:
added some javascript which used to be in loginpage
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/metainf/tags/di/core
Index: head.tagx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/head.tagx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- head.tagx 1 Feb 2008 15:30:09 -0000 1.5
+++ head.tagx 14 Mar 2008 15:47:33 -0000 1.6
@@ -32,6 +32,20 @@
function printThis() {
window.print();
}
+
+ // I'm not sure the javascript has a correct place here
+ addEventHandler(window, "load", function() {
+ var form = document.forms[0];
+ for (var i=0; i < form.elements.length; i++) {
+ var elem = form.elements[i];
+ // find first editable field
+ var hidden = elem.getAttribute("type"); //.toLowerCase();
+ if (hidden != "hidden") {
+ elem.focus();
+ break;
+ }
+ }
+ });
</script>
<jsp:doBody />
</head>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs