HTML/Javascript help

GVNPublic123
GVNPublic123 used Ask the Experts™
on
Ok,

So lets say I have a table:
<table>

</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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
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.

Author

Commented:
I just figured it out. I dont need to use <div> but can put id to <tr> and that works. Thanks anyway.

Author

Commented:
oh yawkey didn't see your response....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial