>>>>> "Jim" == Jim Calder <[EMAIL PROTECTED]> writes:
Jim> I have a form which has three modes; Create, Edit, and View. When the form Jim> is Create or Jim> Edit, I want to place the focus on the first field (longName). But when I Jim> use a logic:equal Jim> tag to determine the correct html:form tag, I get a corrupted html file. Is Jim> there another solution Jim> besides the logic:equals tag? Jim> [ [ JSP Page ] ] Jim> <body> Jim> <logic:notEqual name="accountDetailsForm" property="action" Jim> scope="request" value="View"> Jim> <html:form action="/accountDetailsSave"> Jim> </logic:notEqual> Jim> <logic:equal name="accountDetailsForm" property="action" Jim> scope="request" value="View"> Jim> <html:form action="/accountDetailsSave" focus="longName"> Jim> </logic:equal> Jim> ... <!-- Lots of HTML/JSP code --> Jim> </html:form> Jim> </body> Jim> [ [ Rendered HTML - performing an Edit ] ] Jim> <body> Jim> <form name="accountDetailsForm" method="POST" Jim> action="/myApp/accountDetailsSave.do"> Jim> </logic:notEqual> Jim> </form></html> You can't "overlap" tag regions. It's not valid XML. At the least, you'd have to have two complete "html:form" elements, including all of their contents, each in either the "notEqual" or "equal" case. However, if the contents of the two forms are identical, except for needing focus in one field in one case, then you might consider having a single form, but using a runtime value for the "focus" attribute (note the javadoc shows an RT value for this is legal). Use an expression which evaluates to "longName" in the "equal" case, and equal to "" in the "notEqual" case. I would assume a "focus" value of an empty string would essentially be a noop (untested). -- =================================================================== David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>