• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

HTML/Javascript help


So lets say I have a table:


Now within this table I have rows. What if I want to remove 1 row?
I tried:
<div id='1234'><tr><td></td></tr></div>

And than with javascript:
document.getElementById('1234').style.display = 'none'

But it doesnt work. It does however work if whole table is in div, but I just need to be able to remove specific rows on live page.

Any ideas?
  • 2
1 Solution
you can't have a div embedded in a table like that.  move the "id='1234'" to the <tr> element and your javascript will work as is.
GVNPublic123Author Commented:
I just figured it out. I dont need to use <div> but can put id to <tr> and that works. Thanks anyway.
GVNPublic123Author Commented:
oh yawkey didn't see your response....
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now