I could be wrong but I can't think of anything that would be very convenient. 
The only way I could imagine doing it (and I'm not sure it would even work) 
would be to invoke a javascript function every time the page loads. You could 
add a bean with the data needed by the javascript  to the request, from your 
action class. NOTE: this would require you to forgo the automatic form 
validation and instead trigger validation from your action class. This is the 
only way to get the bean I talked about into the request (as a request 
attribute that is).

Troy

On Thursday 16 August 2001 11:03 am, you wrote:
> Is their a nifty way to have the focus automagically go to the field with
> the error, on an input form?  For example, if I have a form with an
> 'amount' field, and the user enters an invalid amount, causing my Action to
> return an appropriate error, keyed in the ActionErrors container with the
> 'amount' property, is there a slick way to have the focus set to that field
> on the form?  I know how to have the error message display next to the
> offending field, but having the focus go there also would be nice.
>
> Thanks!
>
> Steve Molitor
> [EMAIL PROTECTED]

Reply via email to