chaddu1256
IS-IT--Management
Hello everyone I just had a quick question here. I'm updating this webpage and we want to be able to hit the enter key after entering a username/password. I've done this before by changing the button focus when the page loads but the problem im having now is that there are no buttons used on this page and the login button is a .gif image. Some snippets of the code from the page look like this.
<FORM name="login" action="Controller?cmd=login" method="post">
<TABLE border="0" cellpadding="3" cellspacing="0" align="center">
<TR>
<TD align="right"><B><FONT face="Verdana, Arial, Helvetica, sans-serif">Biller ID:</FONT></B>
</TD>
<TD>
<INPUT type="text" name="BillerID" size="12">
</TD>
</TR>
<TR>
<TD align="right"><B><FONT face="Verdana, Arial, Helvetica, sans-serif">Password:</FONT></B>
</TD>
<TD>
<INPUT type="password" name="password" size="12">
</TD>
</TR>
<TR>
<TD colspan="2"> <FONT face="Verdana, Arial, Helvetica, sans-serif" color="FF0000">
<% if ((errors != null) && (!errors.isEmpty())) {out.print(errors.getLastMessage());} %>
</FONT> </TD>
</TR>
<TR>
<TD colspan="2" align="center"> <a href="javascript:OnSubmitClick(document.login,'Controller?cmd=login');"><IMG src="images/login_btn.gif" border="0" alt="Login" width="112" height="20"></a>
</TD>
</TR>
</TABLE>
</FORM>
Would anyone be able to explain to me how to use the enter key to submit this form when a .gif is clicked rather than a button.
<FORM name="login" action="Controller?cmd=login" method="post">
<TABLE border="0" cellpadding="3" cellspacing="0" align="center">
<TR>
<TD align="right"><B><FONT face="Verdana, Arial, Helvetica, sans-serif">Biller ID:</FONT></B>
</TD>
<TD>
<INPUT type="text" name="BillerID" size="12">
</TD>
</TR>
<TR>
<TD align="right"><B><FONT face="Verdana, Arial, Helvetica, sans-serif">Password:</FONT></B>
</TD>
<TD>
<INPUT type="password" name="password" size="12">
</TD>
</TR>
<TR>
<TD colspan="2"> <FONT face="Verdana, Arial, Helvetica, sans-serif" color="FF0000">
<% if ((errors != null) && (!errors.isEmpty())) {out.print(errors.getLastMessage());} %>
</FONT> </TD>
</TR>
<TR>
<TD colspan="2" align="center"> <a href="javascript:OnSubmitClick(document.login,'Controller?cmd=login');"><IMG src="images/login_btn.gif" border="0" alt="Login" width="112" height="20"></a>
</TD>
</TR>
</TABLE>
</FORM>
Would anyone be able to explain to me how to use the enter key to submit this form when a .gif is clicked rather than a button.