Re: Setting focus on invalid form submission

2005-05-02 Thread Wendy Smoak
From: "Randy Kennedy" <[EMAIL PROTECTED]> > I am wondering if there is a way to set the focus after a form has been > validated through Struts and deemed invalid? Currently, focus always > goes to the first form element. Is there not a way to make this go to > the first INVALID form element? I

Re: Setting focus on invalid form submission

2005-05-02 Thread Brady Hegberg
I think this would have to be done with Javascript. And it might be a bit tricky determining what the first invalid element was. I think it would involve setting javascript variables and then looping through the page looking for the first one with an error. Unless there's a way to do it with the

Setting focus on invalid form submission

2005-05-02 Thread Randy Kennedy
Relatively new to the list, so I apologize if this has already been submitted. I am wondering if there is a way to set the focus after a form has been validated through Struts and deemed invalid? Currently, focus always goes to the first form element. Is there not a way to make this go to th