Info: (FREE) Username Input Field Focus Mod
|

|
| Author |
|
cwilliams Admin Group

CJWSoft Web Software Developer
Joined: April/06/2004
Online Status: Offline Info: 1729
|
| Added: April/04/2006 at 4:51pm | IP Logged
|
|
|
(FREE) Username Input Field Focus Mod
Here is a nice mod that is easy to do and helpful for your users. It makes the input curser start off in the Username field text box when the Username/Password form loads up. This saves the need to click in the field with the mouse to start typing.

Instructions:
Edit "check_user_inc.asp" with a text editor..
Change this code (its near the bottom half)
Response.Write("<BODY " & BodyTag & ">")
to
Response.Write(vbNewLine & vbNewLine & "<script language=""javascript"">" & vbNewLine) Response.Write("<!-- Hide script for old browsers" & vbNewLine) Response.Write("function InitPage()" & vbNewLine) Response.Write("{" & vbNewLine) Response.Write("SetFocus();" & vbNewLine) Response.Write("}" & vbNewLine) Response.Write("function SetFocus()" & vbNewLine) Response.Write("{" & vbNewLine) Response.Write("document.login.Username.focus();" & vbNewLine) Response.Write("}" & vbNewLine) Response.Write("// End of javascript code. -->" & vbNewLine) Response.Write("</script>" & vbNewLine & vbNewLine) Response.Write("<BODY " & BodyTag & "onload='InitPage()'>")
Now edit "scripts/login_form_inc.asp" with a text editor
and change this code
<form method="POST" action="<% =Thispage %>">
to this
<form method="POST" action="<% =Thispage %>" name="login">
That's it. Go load a public protected page and see if it worked.
If you want to do this in the admin area login process repeat this process, but edit the "admin/check_admin_inc.asp" and the "admin_login_form_inc.asp" pages.
Back up your pages before trying any of these changes.
__________________
Best Regards,
Christopher Williams
www.CJWSoft.com
|
| Back to Top |
|
| |
|
|
If you wish to make a comment to this info you must first login If you are not already registered you must first register
|
|
You cannot add new info in this area You cannot add to info in this area You cannot delete your info in this area You cannot edit your info in this area You cannot create polls in this area You cannot vote in polls in this area
|
|