/    Sign up×
Community /Pin to ProfileBookmark

how to hide a table row

Hello people

I tried to hide a table row by using the following code:
<table …>
<tr id=”row0″ style=”display:inline;”>
<td …>
</tr>
</table>

and JavaScript snippet:
document.getElementById(‘row0’).style.dispay = ‘none’;

This works well in IE, but in Firefox, in messes up my table
Can I use these attributes in the context of a <tr>, and if not, how can I hide an entire table row?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorJun 07.2005 — var myrow=document.getElementById('row0');

myrow.parentNode.removeChild(myrow);


But... can u detail your need? There might be a more dynamic way to handle the table childnode using indexes rather that ids.
×

Success!

Help @jasongr spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...