I have a table with many link-buttons in table head. This buttons work like switchers for the content of the table. Only one table is displayed at the moment and others are hidden. So if I click button I want to hide current table and show new one. I use this easy javascript
<script>
function hideStuff(element_id) { document.getElementById(element_id).style.display = 'none';}
function showStuff(element_id) { document.getElementById(element_id).style.display = 'block'; }
</script>
and onclick event
onclick="showStuff('table2'); hideStuff('table1');
However I have many buttons there and I dont know, for exapmple I click on table9 button but which table do I need to hide? (Tables 1,2,3...10 coud be active)
So my question is how can I modify my code to hide active element(table) and display new(desired one)
Thank you.