Dynamically add text-field to jsp page (use ADD button)
800340Oct 29 2006 — edited Dec 16 2008hi 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