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

cant display the table

 
selvakumar Thiyagarajan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I need to dynamically display the table using javascript. I have a table and a combo box.If a select an item from a combo box, the row which consists of selected item fro m the combo box should only appear and other rows should disappear.I have attached the code.The code works fine when i select an item for the first time.If change the item the table is not working properly



Please any body guide me to resolve this problem ,,,,Thanks in advance
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your logic is rather flawed, you never changed the visibility of things after you hid them. Impossible with the logic.
You are referencing comb the wrong way inside the selectedIndex.

I thought I would be nice and fix your code and I used variable names that make sense when you read them ;):



Eric
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic