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


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

Send me One Million FREE Guaranteed Visitors