Hi anybody.
I want to control (display or hide) any row in one table as follow...
<script language= "javascript">
document.write("<TABLE border=" + "\"" +"0" + "width="+ "\"" + "100%" + "\""+">")
document.write("<TR id ="+ "\"" +"col1" + "\"" +"><td>")
document.write ("Menu 1")
document.write("</td></TR>")
document.write("<TR id ="+ "\"" +"col2" + "\"" +"><td>")
document.write ("Menu 2")
document.write("</td></TR>")
document.write("</TABLE>")
col1.style.display ="none"
</script>
In this scipt, i use: col1.style.display ="none" to hide col1 is OK. Now, I would like to use a variable (ex.. temp) instead of "col1" how can i do that?
I want to control (display or hide) any row in one table as follow...
<script language= "javascript">
document.write("<TABLE border=" + "\"" +"0" + "width="+ "\"" + "100%" + "\""+">")
document.write("<TR id ="+ "\"" +"col1" + "\"" +"><td>")
document.write ("Menu 1")
document.write("</td></TR>")
document.write("<TR id ="+ "\"" +"col2" + "\"" +"><td>")
document.write ("Menu 2")
document.write("</td></TR>")
document.write("</TABLE>")
col1.style.display ="none"
</script>
In this scipt, i use: col1.style.display ="none" to hide col1 is OK. Now, I would like to use a variable (ex.. temp) instead of "col1" how can i do that?