Andreas Schneider: JavaScript-Variable in URL!

Beitrag lesen

Hallo mipu,

Kleine Änderung:

var bla;

if (document.getElementById("TABLE_1").style.visibility="visible"){

bla = "datei1.html";

}

else {
    bla = "datei2.html"

}

Die Variable bla wird außerhalb des Blocks deklariert, da sie sonst nur innerhalb des Blocks gültig wäre.

Grüße
Andreas

--
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
(Rich Cook)