|
-
Jan 17th, 2008, 08:14 AM
#1
Thread Starter
G&G Moderator
[RESOLVED] [Javascript] Element not disappearing as expected.
Howdy all,
I was wondering.. with the below code.. why the table's cell data doesn't disappear as I would expect it to?
Code:
function HideTables()
{
var divtags = document.getElementsByTagName("div");
for (i=0;i<num_Tabs;++i) {
var tables = divtags[i].getAttribute("tabletag");
if (tables=="table") {}
divtags[i].style.display="none";
}
}
Code:
<div id="HomeTable" tabletag="table">
This text should disappear.. ?!?!?!?!?!
</div>
Clearly I'm not meant for web design.. 
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jan 17th, 2008, 08:55 AM
#2
Thread Starter
G&G Moderator
Re: [Javascript] Element not disappearing as expected.
Yeah.. dw, I'm completely stupid.
I was using num_Tabs for some stupid reason.. with so many <div> tags in my page, and only 4 tabs (num_Tabs=4), I never reached the table I wanted to disappear!
Thanks anyway!
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|