S
slinky
I'm trying to simply set the focus of "txtUserName" upon opening this
login form. I put in some Javascript but it is not working. Any
ideas? Thanks!
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb"
Inherits="Forsyth.HR_ReportingTool.UI.Login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Login</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/
intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout" bgcolor="#6699ff"
background="file:///C:\Inetpub\wwwroot\HR_ReportingTool\vignette.gif">
<script language="JavaScript">
function doFocus(){
if(document.forms[0].txtUserName)document.forms[0].txtUserName.focus();
}
</script>
<form id="Form1" method="post" runat="server">
<asp:TextBox id="txtUserName"
</asp:TextBox>
</form>
</body>
</HTML>
login form. I put in some Javascript but it is not working. Any
ideas? Thanks!
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb"
Inherits="Forsyth.HR_ReportingTool.UI.Login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Login</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/
intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout" bgcolor="#6699ff"
background="file:///C:\Inetpub\wwwroot\HR_ReportingTool\vignette.gif">
<script language="JavaScript">
function doFocus(){
if(document.forms[0].txtUserName)document.forms[0].txtUserName.focus();
}
</script>
<form id="Form1" method="post" runat="server">
<asp:TextBox id="txtUserName"
</asp:TextBox>
</form>
</body>
</HTML>