[Seaside] Setting focus on Input field in form

Brett Taylor brett.taylor at healthauditors.com
Tue Mar 16 19:11:41 CET 2004


On Tue, 2004-03-16 at 01:46, Lukas Renggli wrote:

> Why don't you use
> 
> 	document.forms[0].elements[0].focus()
> 
> to set the focus onto the first control within the first form of the 
> document? In my opinion this is what you want in the most cases anyway 
> else you could also fiddle with the index numbers ...
> 
> Cheers,
> Lukas

It looks like there is often a hidden input control defined first in the
sequence input fields.  Are hidden input controls returned in the
elements array?  

BTW, a reason that I don't always want to use the first element is that
I return to the page when errors occur and want focus on another element
based on where the first error occurred. I'm modifying my system to
handle this case right now.

Thanks




More information about the Seaside mailing list