How do you do client-side validation when using the Struts tags??
Normally, you can reference the name of the form, and the field in the
form and run a test against that by writing a function in javascript.
However, I do not know how to reference either the form name or the
field when using the Struts tag.
ex. <form name=MyForm>
<input type=text name=username>
To test agains the username field, I could access it by writing: if
(document.MyForm.username.value=="")
{
alert("Enter username");
}
How can I do something similar to that when using the Struts tags?? For
example if my tag is:
<html:form action="/logon">
<html:text property="username"/>
I am in desperate need of an answer to this question, and the sooner it
can be answered the better. If you can not do a similar type of
validation like in the first example, can you suggest a way of doing the
same type of testing? Thank you very much.
Tom