Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i create dynamic input fields after click a button?

 
Derek Bright
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, my jsp has a button that once a user clicks, a new input field, say a textbox appears. If he clicks the button again, another new input field will appear...below is an illustration:

Add text box JSP
---------------------------
<Add New TextBox Button>

After i click the button once,
The page will become:

Add text box JSP
----------------------------
Name: ___________
<Add New TextBox Button>

After i click the button again,
The page will become:

Add text box JSP
----------------------------
Name: ___________

Name: ___________
<Add New TextBox Button>

How can this be done? And how can i retrieve such values? Thanks!
 
Derek Bright
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just come across javascript to help me solve the above problem, is this the probable way or another way to ask will be is this the best way to solve the above issue?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic