Solved

HTML/Javascript help

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

773 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