Solved

HTML/Javascript help

Posted on 2012-04-11
3
300 Views
Last Modified: 2012-04-11
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?
0
Comment
Question by:GVNPublic123
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
yawkey13 earned 500 total points
ID: 37833365
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.
0
 

Author Comment

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

Author Comment

by:GVNPublic123
ID: 37833385
oh yawkey didn't see your response....
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question