Hi und danke für Deine Antwort,
es gibt keine Fehlermeldung der JS Konsole. Einen Syntaxerror habe ich auch nicht. Ich meinte mit "Syntax" lediglich, dass IE 6.0 uU eine andere Syntax braucht in einem der Befehle?!?
Die Funktion setimgopacity(0.1); ist eine weitere Funktion die ich verwende, sie ändert einfach den Opacity Wert des zu behandelnden Divs. Das hat allerdings mit meinem Problem nichts zu tun, daher habe ich sie nicht extra gepostet. Die andere Funktion ist auch eher nebensächlich. Aber gut, ich habe unten einmal alle Funktionen aufgeführt.
Das Problem ist ganz simpel: In FF, IE 7.0, Mac Safari wird das Div nach der Änderung des Visibility Wertes angezeigt, in IE 6.0 nicht.
Danke für die Hilfe !
------------------------------------
var targetobject;
var opacitystring;
function showDiv(){
targetobject=document.getElementById("language_selector");
setimgopacity(0.1);
//Show div
targetobject.style.visibility ="visible";
opacitystring= 'filter:progid:DXImageTransform.Microsoft.alpha(opacity=10); -moz-opacity: 0.1; opacity: 0.1';
//Changing opacity of targetobject
targetobject.currentopacity=0.1; //Starting opacity value
//Starting fading in
targetobject.opacitytimer=setInterval("opacityanimation()", 70);
}
function setimgopacity(value){
var ievalue=value*100;
//Sets the opacity of "language_selector" div per the passed in value setting (0 to 1 and in between)
targetobject.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+ ievalue + ");"; //IE7 opacity
if (targetobject.filters && targetobject.filters[0]){ //IE syntax
if (typeof targetobject.filters[0].opacity=="number") //IE6
targetobject.filters[0].opacity=value*100;
else //IE 5.5
targetobject.style.filter="alpha(opacity="+value*100+")";
}
else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax
targetobject.style.MozOpacity=value;
else if (typeof targetobject.style.KHTMLOpacity!="undefined") //Safari syntax
targetobject.style.KHTMLOpacity= value;
else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax
targetobject.style.opacity=value;
else //Non of the above, stop opacity animation
stopanimation();
}
function opacityanimation(){ //Gradually increase opacity function
setimgopacity(targetobject.currentopacity);
targetobject.currentopacity+=0.1;
if (targetobject.currentopacity>0.9)
stopanimation();
}
//Clean on end of animation
function stopanimation(){
/*if (typeof opacitytimer!="undefined")*/
clearInterval(targetobject.opacitytimer);
}