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

Switch display of tables using Javascript

 
Mervin Chan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple Question:

I have two tables A,B on my Jsp page

I want to use javascript to, upon pressing a button, alternate between displaying table A or B. But not both at the same time.

ie.

Button pressed - Table A displayed.
Button pressed again - Table B displayed
.... A, B, A , ...


How do i do that?
[ October 06, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the display CSS attribute, alternating its value between 'block' (to show) and 'none' (to hide).
[ October 06, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic