PDA

View Full Version : Make table row visible in NS6


spc
08-28-2002, 12:27 PM
I have a row in a table which I make visible when a button is pressed. I need it to work in IE5 and NS6.

The code below works in IE5, but in NS6 the row appears but the table cells have borders (which I don't want). Other rows, which weren't hidden, do not have borders.

This is the function I call when the button is pressed;

function DisplayNotes() {
var objNotesRow = document.getElementById("notesrow");
if (objNotesRow.style.visibility != "visible") {
objNotesRow.style.visibility = "visible";
objNotesRow.style.display = "block";
}
}

and this is the row in the table;

<tr name="notesrow" id="notesrow" style="visibility:hidden;display:none">
<td height=30 width=10>Some text</td>
<td height=30 width=560><textarea rows=8 cols=65 name=myNotes id=myNotes>Some text</textarea></td>
<td height=30 width=30>Some text</td>
</tr>

No border is set for the table. I tried setting various border styles, so that no border appears, but this has no effect.

Has anybody any ideas?

beetle
08-28-2002, 03:12 PM
well, first of all, it is unecessary to toggle both the visiblity AND display properties of the TR. 2nd, you should change only the display property to blank, not "block"function DisplayNotes() {
var objNotesRow = document.getElementById("notesrow");
if (objNotesRow.style.display == "none") objNotesRow.style.display = "";
}

spc
08-28-2002, 04:37 PM
Thanks, it's working now!:)