Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add text when "add" button is clicked

 
Ambika Jain
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my jsp page, there is an option for adding new entries. I have a "add" button. I want to show the text field (in which info will be typed) to be
shown only if I click on "Add". How do I do this ?

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64630
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to HTML/Javascript.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64630
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use CSS to initially hide the text field, and reveal it when the Add button is clicked. Look up the display CSS attribute in order to hide/show elements.
 
Ambika Jain
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please show some example. I have not done this before.

Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic