focus

M

mimy

when the page is loading Iwouid like that the text box will have focus. how i do that?
 
J

Jim Buyens

mimy said:
when the page is loading Iwouid like that the text box will have focus.
how i do that?

Add this attribute to your <body> tag:

onload="document.forms[0].myField.focus();"

where myField is the name of the form field.

--
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Top