Advertisement

08.06.2007 at 10:36AM PDT, ID: 22744656
[x]
Attachment Details

Dynamic Form Elements

Asked by design_web in Java Standard Tag Library (JSTL) & Server Tags, Java Servlets, J2EE Frameworks

Tags: form, dynamic, elements

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
[+][-]08.06.2007 at 11:51AM PDT, ID: 19640638

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.06.2007 at 07:45PM PDT, ID: 19643071

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Standard Tag Library (JSTL) & Server Tags, Java Servlets, J2EE Frameworks
Tags: form, dynamic, elements
Sign Up Now!
Solution Provided By: boonleng
Participating Experts: 1
Solution Grade: B
 
 
[+][-]08.15.2007 at 08:16AM PDT, ID: 19700389

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628