[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm

bowersj2 lon-capa-cvs@mail.lon-capa.org
Mon, 14 Oct 2002 16:14:58 -0000


bowersj2		Mon Oct 14 12:14:58 2002 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  Fixing a pet peeve: When you go to the login screen, the focus will now
  be automatically sent to the username box, if the browser supports it. The
  "if" statement should prevent any script errors. I was worried Netscape 4
  wouldn't work, but lo, it does. Not tested in IE but I see no reason this won't
  work.
  
  This means you can now login in with the keyboard sequence 
  "usernameTABpasswordENTER", which can't be optimized any more.
  
  It's the little things... and commit messages five times the size of the 
  code committed... that make all the difference.
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.24 loncom/auth/lonlogin.pm:1.25
--- loncom/auth/lonlogin.pm:1.24	Tue Sep 17 16:06:34 2002
+++ loncom/auth/lonlogin.pm	Mon Oct 14 12:14:58 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.24 2002/09/17 20:06:34 matthew Exp $
+# $Id: lonlogin.pm,v 1.25 2002/10/14 16:14:58 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -334,6 +334,11 @@
    <td align="right" background="$iconpath/fillbottom.gif"><img src="$iconpath/lowerright.gif" alt="" /></td>
   </tr>
  </table>
+
+<script>
+// the if prevents the script error if the browser can't handle this
+if ( document.client.uname ) { document.client.uname.focus(); }
+</script>
 
 ENDDOCUMENT
 }