Is it possible when using a select box to display form elements depending on which option was selected for example:
<select>
<option value="d1">Option One</option>
<option value="d2">Option Two</option>
</select>
If I selected "Option One" a textbox and a submit button would appear. For "Option Two" a radio button and a textbox plus a submit button would appear.
If I use a servlet and JSTL and spring how could I get this to work? I'm new to Java so a detailed description or a tutorial would be great. I have javascript to make it work but having a problem when submitted the form elements disappear and I have to select option 1 or two again.
Start Free Trial