jpmoriarty
01-14-2003, 05:53 AM
I'm using (Display:none) and a bit of script to change that to make a navigation bar that expands and contracts. it all works really well, with different blocks coming down and then sub sections expanding etc, it's just that occasionally if i have two or three of the main sections expanded, and then i exopand and contract a subsection, it's as if the screen isn't updating properly and the bottom few go really screwy (ie only displaying the top half of a line etc)
Is this a known problem with IE 6 - is it cos I'm not supposed to be hiding div's and the like? is there a patch i can get? or is it none of the above, and likely that my code is botched!?
I'll include the java script that i have for the expanding contracting stage...
function expandIt(BlockName) {
img = eval('document.img_'+BlockName);
x=img.src;
if (document.getElementById(BlockName).style.display == "block") {
document.getElementById(BlockName).style.display = "none";
if (x.substring(x.length-8,x.length) == "down.gif") img.src = "menu_up.gif";
else img.src = "menu_down.gif"
} else {
document.getElementById(BlockName).style.display = "block";
if (x.substring(x.length-6,x.length) == "up.gif") img.src = "menu_down.gif";
else img.src = "menu_up.gif";
}
}
oh and i have this for the expanding the sub section:
function expandIt2(BlockName) {
img = eval('document.img_'+BlockName);
if (document.getElementById(BlockName).style.display == "block") {
document.getElementById(BlockName).style.display = "none";
} else {
document.getElementById(BlockName).style.display = "block";
}
}
Is this a known problem with IE 6 - is it cos I'm not supposed to be hiding div's and the like? is there a patch i can get? or is it none of the above, and likely that my code is botched!?
I'll include the java script that i have for the expanding contracting stage...
function expandIt(BlockName) {
img = eval('document.img_'+BlockName);
x=img.src;
if (document.getElementById(BlockName).style.display == "block") {
document.getElementById(BlockName).style.display = "none";
if (x.substring(x.length-8,x.length) == "down.gif") img.src = "menu_up.gif";
else img.src = "menu_down.gif"
} else {
document.getElementById(BlockName).style.display = "block";
if (x.substring(x.length-6,x.length) == "up.gif") img.src = "menu_down.gif";
else img.src = "menu_up.gif";
}
}
oh and i have this for the expanding the sub section:
function expandIt2(BlockName) {
img = eval('document.img_'+BlockName);
if (document.getElementById(BlockName).style.display == "block") {
document.getElementById(BlockName).style.display = "none";
} else {
document.getElementById(BlockName).style.display = "block";
}
}