Kylena
01-25-2005, 03:34 AM
I have the following script that does this:
When I click on a link it displays information that are in that div section. When I click on another link, it displays info in that other div section.
However, not all the sections are of equal length, the visibility only hides the info and if any one of the info in a section is short, the scrollbar is still there. I don't want that.
How do I change the code such that I'm using document.forms[0].getElementByID('name').style.display = 'none'; instead?
function showtab(tabnum)
{
var tabname = "tab" + tabnum;
if (tabname != currtab)
{
if (window.document.layers)
{
handle = "window.document.layers";
stylevar = "";
}
else
{
handle = "document.all";
stylevar = ".style";
}
}
eval(handle + '"[' + currtab + '"]' + stylevar + '.visibility = hidden');
eval(handle + '"[' + tabname + '"]' + stylevar + '.visibility = visible');
}
When I click on a link it displays information that are in that div section. When I click on another link, it displays info in that other div section.
However, not all the sections are of equal length, the visibility only hides the info and if any one of the info in a section is short, the scrollbar is still there. I don't want that.
How do I change the code such that I'm using document.forms[0].getElementByID('name').style.display = 'none'; instead?
function showtab(tabnum)
{
var tabname = "tab" + tabnum;
if (tabname != currtab)
{
if (window.document.layers)
{
handle = "window.document.layers";
stylevar = "";
}
else
{
handle = "document.all";
stylevar = ".style";
}
}
eval(handle + '"[' + currtab + '"]' + stylevar + '.visibility = hidden');
eval(handle + '"[' + tabname + '"]' + stylevar + '.visibility = visible');
}