Is it possiable atleast to make by password field with color change when ever there is error message for
<html:errors property="password"/> Example: background color red for password field. <html:password property="password" size="15" maxlength="20" redisplay="false" styleClass="inputBox"/> -----Original Message----- From: Rahul Akolkar [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 6:50 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: focus in html object On 3/24/06, Raghuveer <[EMAIL PROTECTED]> wrote: > > In my log screen i have 2 text boxes to input user login user id and > password. > Initiall when page loads i am focusing on username by focus attribute in > form tag. > If there is an error in password , i display Struts Action Error as > "password is required." > > What i need to do to focus the cursor on "password" textbox when there is > error in password. > > I.e Does struts1.2.8 provides any facility for focusing respective html > object (if there is any error related to the property )? > > ------------------------------------------- > <html:form action="/Login.do?method=loginCheck" focus="username" > <snip/> The functionality is provided, since focus is rtexprvalue true, so you can render an expression of choice as its value (for instance, one which checks for password errors being present and returns either "username" or "password" accordingly). -Rahul > <html:text property="username" size="15" maxlength="20" > styleClass="inputBox" /><html:errors property="username"/> > <html:password property="password" size="15" maxlength="20" > redisplay="false" styleClass="inputBox"/><html:errors > property="password"/> > > --------------------------------- > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]