Use the Javascript function: document.form.field.focus() to give the object the focus.
<body onload="document.formname.fieldname.focus()" >Another way to set focus:
<form name="form1" action="somepage.asp" method="post"> <input type="text" name="city"> <input type="submit" value="Submit"> </form> <script language="JavaScript"> document.forms[0].city.focus(); </script>