[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.. :eek:
chem
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