|
-
September 19th, 2007, 10:55 PM
#1
about controlling the visibility of table row
I would like to make certain rows of table invisible when the page is first loaded. The user can display the rows by clicking on a button. The button will then call the functions.
i have set id on the rows like <tr id="secondSH">, but i got two problems.
First, the row will not be invisible when the page is first loaded
Second, when click the button, nth is done.
Here is my code which has been put put in the head section
Code:
document.getElementById('secondSH').style.display = "none";
function enableSecondShareHolder() {
var SHRows = document.all.tags("TR");
for ( i = 0; i < SHRows.length; i++ ) {
if ( SHRows[i].ID == "secondSH" ) {
SHRows[i].style.display = "inline";
}
}
}
Thank you very much for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|