I have a list of radio buttons, and one of the option is other, if other radio button is clicked i have to take a text box value with the same name as radio button, Can anyone help me please..
posted 11 years ago
you can't do this as it is an HTML limitation. if you have 2 form elements with the same name (the 'other' radio value and the 'other' text field), the values will be combined into an comma-delimited value. the struts way to do this is name the radio option property something along the line of 'radioOption' and the text box 'otherValue'. in your action class, you need to have a conditional statement to change set the 'radioOption' value to the 'otherValue' field value.
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>