Forum Moderators: open

Message Too Old, No Replies

Hide <td> in <table> & InnerHTML

         

aax123

10:23 pm on Sep 2, 2005 (gmt 0)

10+ Year Member



The HTML below is being generated using javascript and I need to know how to hide the <td> in the form? Am I able to do it by using style='visibility: hidden ;'

----------------------------------------
oNewTd3 = document.createElement("td");

oNewTd3.innerHTML = "<div id='linerMake'><input type=text size=15 style='background-color: #FFFFFF' id='linerMake' class=copy name=linerMake_" + vid + " value=\"" + trim(linerMake + " " + comSignature) + "\"></div>";

sb.Append("<td width=75px class=admin8lb><span id='spanMake' style='visibility: ; ' class=admin8lb>&nbsp;MAKE&nbsp;</span></td>")
sb.Append("<td width=75px class=admin8lb><span id='spanMake' style='visibility: ; ' class=admin8lb>&nbsp;MAKE&nbsp;</span></td>")

Rambo Tribble

4:26 pm on Sep 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



visibility:hidden; will reserve space for the element while hiding its content (additionally, external content for the element will be downloaded, but not shown). display:none; will completely remove the element from the document's rendering.

Obviously, display:none; would be inappropriate for a td, as that could adversely affect table rendering, though it would be useful for removing an entire tr from the display.