File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes cant display the table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "cant display the table" Watch "cant display the table" New topic

cant display the table

selvakumar Thiyagarajan

Joined: Oct 06, 2008
Posts: 28
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

Joined: Nov 08, 2001
Posts: 15385
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 ;):

I agree. Here's the link:
subject: cant display the table
It's not a secret anymore!