Forum Moderators: open
I have an ASP page which generates multiple tables dynamically.I have assigned unique id and name to each table through script.
How can I write a javascript to show and hide each table by clicking a hyperlink against each table by using javascript and Style Sheet?
I used the following code for it :
<script>
function showhideTab(Id){
document.all.Tbl_1.style.display = 'none' ;
//document.all.Tbl_[Id].style.display = 'none' ;
}
</script>
Where Tbl_1 is the id and name of first table.
But when I use Id variable (written in comments) it gives me script error.
Can anyone help me to fix the error so that I can show and hide each table by just sending the Id of it?
Thank you in advance.