Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamically add text-field to jsp page (use ADD button)

800340Oct 29 2006 — edited Dec 16 2008
hi there,

I'm building my application with struts.
my familyForm has the following properties:
String fname;
String lname;
String dob;

since every family has different 'size' I thought of having a [+] button where the end-user can click and have a newly line of info.

example

1. fname [............] lname [...............] dob [...............]
[+]

assuming the end-user provided some info and clicked the [+] button, the 'newly' page would look like this:

1. fname [James .....] lname [Gosling.....] dob [19 May 1956.]
2. fname [...................] lname [...................] dob [........................]
[+]

Question:
1. What should be in the action of the [+] button?
2. How would the jsp 'create' a new line and place it in the right spot (right after number 1)

thanks for any thoughts
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2009
Added on Oct 29 2006
8 comments
2,918 views