Solved

HTML/Javascript help

Posted on 2012-04-11
3
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
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?
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

734 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