Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HTML/Javascript help

Posted on 2012-04-11
3
Medium Priority
?
332 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

610 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