You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scott's fix for IE6 to hide and then show <SELECT> fields causes problems
when the current visibility of the object is 'inherit' or 'hidden'.
E.g. the dropdown is on a div layer that is currently hidden (a menu pane
for example). The visibility value of the dropdown will be 'inherit' i.e.
it inherits the value of it's parent. Scott's fix hides the dropdown but
then sets it to visible when the modal window is closed. This results in
the dropdown then being visible when it shouldn't be.
I've fixed this by storing the visibility property for each SELECT field
in hideSelectBoxes() and then restoring it to its previous value in
displaySelectBoxes().
var gSelectArray;
function hideSelectBoxes() {
var x = document.getElementsByTagName("SELECT");
gSelectArray = new Array();
for (i=0;x && i < x.length; i++) {
/* .currentStyle property is IE only but this shouldn't be a problem
here */
switch (x[i].currentStyle.visibility) {
case "hidden" :
gSelectArray[i] = 0;
break;
case "visible" :
gSelectArray[i] = 1;
x[i].style.visibility = "hidden";
break;
case "inherit" :
gSelectArray[i] = 2;
x[i].style.visibility = "hidden";
break;
}
}
}
function displaySelectBoxes() {
var x = document.getElementsByTagName("SELECT");
for (i=0;x && i < x.length; i++){
switch (gSelectArray[i]) {
case 0:
x[i].style.visibility = "hidden";
break;
case 1:
x[i].style.visibility = "visible";
break;
case 2:
x[i].style.visibility = "inherit";
break;
}
}
}
Original issue reported on code.google.com by gmail%ac...@gtempaccount.com on 21 May 2009 at 9:44
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
gmail%ac...@gtempaccount.com
on 21 May 2009 at 9:44The text was updated successfully, but these errors were encountered: