This should do the trick. Of course, modify the object names using your
real form and form element names.
function init() {
document.myFormName.myFormElementName.focus();
}
<body onSubmit="init();">
Jeff Beer
Senior Programmer Architect
Hydrogen Media, Inc
(727) 530-5500 x303
[EMAIL PROTECTED]
> -----Original Message-----
> From: David Hannum [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 11:13 AM
> To: CF-Talk
> Subject: OT: JS Question
>
>
> Hello,
>
> Is there a way to force the focus to a form field (text field) onLoad?
>
> Thanks,
> Dave
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists