Setting Form Focus

Use the Javascript function: document.form.field.focus() to give the object the focus.

i.e., <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">
<script language="JavaScript"> document.forms[0].city.focus(); </script>

It's easy... it's a PSACAKE!
Back | Tell A Friend | Search this Site
1998 - 2014
Version 3.23

Send me One Million FREE Guaranteed Visitors