Using struts ? I don't think such a mechanism is built in struts. With my
previous client i have done something similar to this....The logic goes like
this...
In the <BODY> tag, use a conditional if-else statement.
Basically your errors are encapsulated in an errors session object.
In the if{} statement check for errors, if errors exist, then call the
onload () javascript function. In this function set focus to the first error
field.
Hope this helps. I infact made this suggestion to the struts community to
include this functionality in the <html:form> tag. I hope somebody notices
the importance of this, and make the appropriate changes to the 1.1 version.
cheers,
Amar..
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 9:30 AM
To: [EMAIL PROTECTED]
Subject: MOVEING CURSOR INTO THE ERROR FIELD.
Hi,
I 'am using staruts for a small pilot project.
On the form bean when validate method collect errors and shows in JSP,
I want at the same time my cursor should move to the first error field. how
I can acheive this..
does anybody knows about this...
Thanks N Regards
TAHIR IQBAL
Information Services Division (ISD)
Loblaw Companies Limited
6 Monogram Place
Weston, ON - M9R 4CR
* 416-246-7831
Email [EMAIL PROTECTED] "Stay Cool
And U'll Rule"