[dev] passwd: [patch]

Marc Jauvin marc at register4less.com
Mon Jul 21 19:55:23 PDT 2003


This patch sets the focus to the "oldpassword" field onLoad

--
Marc Jauvin
http://register4less.com
450-441-5458
-------------- next part --------------
Index: templates/main/javascript.inc
===================================================================
RCS file: /repository/passwd/templates/main/javascript.inc,v
retrieving revision 1.2
diff -u -r1.2 javascript.inc
--- templates/main/javascript.inc       21 Jan 2003 00:32:45 -0000      1.2
+++ templates/main/javascript.inc       22 Jul 2003 02:54:03 -0000
@@ -25,5 +25,17 @@
         return true;
     }
 }
+
+function setFocus()
+{
+    if (document.passwd.oldpassword.value == "") {
+        document.passwd.oldpassword.focus();
+       } else if (document.passwd.newpassword0.value == "") {
+        document.passwd.newpassword0.focus();
+       } else {
+        document.passwd.newpassword1.focus();
+       }
+}
+
 //-->
 </script>


More information about the dev mailing list