Sunlight-67969-Lud
Grünschnabel
Könnte mir jemand diesen Quelltext erläutern und mir sagen was ich ändern muss, dass das bei mir funktioniert ?
<script language="JavaScript">
<!-- Verstecken für ältere Browser
if (navigator.appVersion.indexOf("2.") != -1){
check = false;
}
if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
check = false;
}
else {
check = true;
}
if (check == true){
image1 = new Image();
image1.src = "GrafikAus1.gif";
image1on = new Image();
image1on.src = "GrafikAn1.gif";
image1stay = new Image();
image1stay.src = "AuswahlGrafik1.gif";
image2 = new Image();
image2.src = "GrafikAus2.gif";
image2on = new Image();
image2on.src = "GrafikAn2.gif";
image2stay = new Image();
image2stay.src = "AuswahlGrafik2.gif";
}
imageStay = ""
function imageon(name){
if (imageStay != name){
document[name].src = eval(name + "on.src");
}
}
function imageoff(name){
if (imageStay != name){
document[name].src = eval(name + ".src");
}
}
function on(name){
if (check == true){
imageon(name);
}
}
function off(name){
if (check == true){
imageoff(name);
}
}
function stay(name){
if (check == true){
document[name].src = eval(name + "stay.src");
if (imageStay != name){
if (imageStay != ""){
document[imageStay].src = eval(imageStay + ".src");
}
}
imageStay = name
}
}// -->
</script>
Danke im Vorraus!
MFG
<script language="JavaScript">
<!-- Verstecken für ältere Browser
if (navigator.appVersion.indexOf("2.") != -1){
check = false;
}
if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
check = false;
}
else {
check = true;
}
if (check == true){
image1 = new Image();
image1.src = "GrafikAus1.gif";
image1on = new Image();
image1on.src = "GrafikAn1.gif";
image1stay = new Image();
image1stay.src = "AuswahlGrafik1.gif";
image2 = new Image();
image2.src = "GrafikAus2.gif";
image2on = new Image();
image2on.src = "GrafikAn2.gif";
image2stay = new Image();
image2stay.src = "AuswahlGrafik2.gif";
}
imageStay = ""
function imageon(name){
if (imageStay != name){
document[name].src = eval(name + "on.src");
}
}
function imageoff(name){
if (imageStay != name){
document[name].src = eval(name + ".src");
}
}
function on(name){
if (check == true){
imageon(name);
}
}
function off(name){
if (check == true){
imageoff(name);
}
}
function stay(name){
if (check == true){
document[name].src = eval(name + "stay.src");
if (imageStay != name){
if (imageStay != ""){
document[imageStay].src = eval(imageStay + ".src");
}
}
imageStay = name
}
}// -->
</script>
Danke im Vorraus!
MFG