I currently have a page with several text boxes with respective buttons i.e.<br><br><text box1><button1><br><text box2><button2><br><text box3><button3><br><br>how do I implement code so that if the text box has the focus i.e. I have clicked on the text box or entered data in that box that the focus goes on the respective button. So that when the return key is pressed the button next to the text box is pressed. I have tried giving focus to the button when the text areas are clicked but this means that I can not type in the text boxes since focus is always given to the button.<br><br>my code currently looks something like this:<br><br>---------------------------------------------------<br><br><br><HTML><br><BODY><br><FORM METHOD="POST" NAME="login" ACTION="webdb.asp" onSubmit="return checkPass()"><br><br><TABLE width=600 align = center><br><TR><br><TD BGCOLOR=#CCCCCC><br><font face="Arial,Helvetica"><font size=+2>BackPocket Database</font></font><br></TD><br></TR><br><br><br><TR><br><TD BGCOLOR=#FFFFCC><br>List all customers with BackPocket service<br></TD><br><TD BGCOLOR=#99FF99 align= center><br><input name="Customers" type="submit" value="List Customers" onclick="javascript:gotonectpage(this);"><br></TD><br></TR><br><br><TR><br><TD BGCOLOR=#FFFFCC > Search query on<br><select NAME="CustQuery"><br> <option VALUE="CustID">Customer ID<br> <option VALUE="CustName">Customer Name<br> <option VALUE="CustEmail">Customer E-mail<br></select> with value of<br> <br><br><INPUT TYPE="text" NAME="SQLvariable" size=16 onclick="javascript:customer_button.focus()"><br></TD><br><TD BGCOLOR=#99FF99 align= center><br><input name="customer_button" type="submit" value="Search" onclick="javascript:gotonectpage(this);"><br></TD><br></TR><br><br><tr><br><TD BGCOLOR=#FFFFCC>Search for customers who have not backed-up in <br><INPUT TYPE="text" NAME="days" size=6 maxlength=6 onclick="javascript:backup_button.focus()"<br>days<br></TD> <br><TD BGCOLOR=#99FF99 align= center ><br><INPUT name="backup_button" TYPE="submit" VALUE="Search" <br>onclick="javascript:gotonectpage(this);"><br></TD><br></TR><br></TABLE><br></FORM><br></BODY><br></HTML><br><br>-----------------------------------------------------------<br><br>I would be grateful for any help given.<br>Thankx<br>