You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bhaskar Gopalan <bg...@adaptintel.com> on 2002/03/27 17:34:42 UTC
Javascript in Struts
Hi,
how does Javascript work with struts? I have a 'Filter' form with a couple
of radio, select and text
fields. The only three request parameters are filterSet, filterType and
filterValue.
Example:
<tr>
<td width="5%" />
<html:radio value="stage" property="filterType" />
<font color="#000000"><bean:message key="prompt.stage"/></font>
</td>
<td>
<html:select size="1" property="filterValue">
<html:option value="0">Select One</html:option>
<html:option value="Stage1">Stage1</html:option>
<html:option value="Stage2">Stage2</html:option>
<html:option value="Stage3">Stage3</html:option>
<html:option value="Stage4">Stage4</html:option>
<html:option value="Stage5">Stage5</html:option>
</html:select>
</td>
</tr>
<tr>
<td width="5%" />
<td width="20%">
<html:radio value="lender" property="filterType" />
<font color="#000000"><bean:message
key="prompt.lenderInFilter"/></font>
</td>
<td>
<html:text size="20" property="lenderVal" />
</td>
</tr>
MY QUESTION IS:
Do I have to give the same property "filterValue" instead of "lenderVal" in
the <html:text>? If so, suppose the user chooses
the first radio button, but chooses both "Stage3" and enters some dummy text
in <html:text> by mistake. Now, will the filterValue be set to Stage3 or the
dummy text? I was initially using javascript (w/o struts) to associate radio
button with the corresponding select/text field. How do I do it now with
struts?
Quick reply appreciated.
Thanks,
Bhaskar
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>