Solved

HTML/Javascript help

Posted on 2012-04-11
3
281 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
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 …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now