• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to take variable inputs from form to jsp  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i am trying to take an n number of inputs from user where n is user defined .i am a bit confused  how to write my jsp so it can as many as inputs required by the user
 
Author and ninkuma
Marshal
Posts: 66730
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot do this with just JSP. Please read this article on how JSP works.

JSP can help you created the initial HTML sent to the browser, but once the page is loaded you'll need to use JavaScript to make changes to the page.

So if, for example, the user choices a count, you'd create that many elements and place them in the correct location within the DOM.

I'd advise using jQuery (a popular JavaScript library) to make the whole thing much easier.
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using jquery and advanced java scripts expressions, you can create the same functionality as you wants.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!