• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

document.write

PRINZ

Lounge-Member
hab n script gebastelt was alle farben aufzeichnet um mir die arbeti zu sparen das selber zu machen. aber es bleibt immer hängen!?

is das nur bei mir so?

hier der code:
Code:
<HTML>
<HEAD>
<script>
aktuellehoehere = new Array(5);
aktuellehoehere[0] = "0";
aktuellehoehere[1] = "0";
aktuellehoehere[2] = "0";
aktuellehoehere[3] = "0";
aktuellehoehere[4] = "0";
aktuellehoehere[5] = "0";

fenster = window.open('','fenster','');
parent.fenster.document.write('<html><head></head><body bgcolor="black"><center><table><tr>');
stand = window.open('','stand','');
parent.stand.document.open();
parent.stand.document.write('test');
parent.stand.document.close();

function colortable()
{
for(i=0 ; i <= 16 ; i++){

switch(i)
{

case 0:
aktuellehoehere[0] = "0" ;
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "1";
break;
case 1:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "2";
break;

case 2:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "3";
break;

case 3:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "4";
break;

case 4:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "5";
break;


case 5:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "6";
break;


case 6:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "7";
break;


case 7:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "8";
break;


case 8:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "9";
break;


case 9:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "A";
break;


case 10:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "B";
break;


case 11:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "C";
break;


case 12:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "D";
break;


case 13:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "E";
break;

case 14:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
aktuellehoehere[0] = "F";
break;


case 15:
parent.fenster.document.write('<td style="background-color:' + aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0] + ';width:5;height:5;" onclick="alert(this.style.backgroundColor)"></td>');
        
        
switch( aktuellehoehere[1] )
{

case "0":
aktuellehoehere[1] = "1" ;
break;

case "1":
        aktuellehoehere[1] = "2" ;
        break;

case "2":
        aktuellehoehere[1] = "3" ;
        break;


case "3":
        aktuellehoehere[1] = "4" ;
        break;


case "4":
        aktuellehoehere[1] = "5" ;
        break;


case "5":
        aktuellehoehere[1] = "6" ;
        break;


case "6":
        aktuellehoehere[1] = "7" ;
        break;


case "7":
        aktuellehoehere[1] = "8" ;
        break;


case "8":
        aktuellehoehere[1] = "9" ;
        break;


case "9":
        aktuellehoehere[1] = "A" ;
        break;


case "A":
        aktuellehoehere[1] = "B" ;
        break;


case "B":
        aktuellehoehere[1] = "C" ;
        break;


case "C":
        aktuellehoehere[1] = "D" ;
        break;


case "D":
        aktuellehoehere[1] = "E" ;
        break;


case "E":
        aktuellehoehere[1] = "F" ;
        break;


case "F":
        aktuellehoehere[1] = "0";
switch( aktuellehoehere[2] )
{
        
case "0":
aktuellehoehere[2] = "1" ;
break;


case "1":
        aktuellehoehere[2] = "2" ;
        break;


case "2":
        aktuellehoehere[2] = "3" ;
        break;


case "3":
        aktuellehoehere[2] = "4" ;
        break;


case "4":
        aktuellehoehere[2] = "5" ;
        break;


case "5":
        aktuellehoehere[2] = "6" ;
        break;


case "6":
        aktuellehoehere[2] = "7" ;
        break;


case "7":
        aktuellehoehere[2] = "8" ;
        break;


case "8":
        aktuellehoehere[2] = "9" ;
        break;


case "9":
        aktuellehoehere[2] = "A" ;
        break;


case "A":
        aktuellehoehere[2] = "B" ;
        break;


case "B":
        aktuellehoehere[2] = "C" ;
        break;


case "C":
        aktuellehoehere[2] = "D" ;
        break;


case "D":
        aktuellehoehere[2] = "E" ;
        break;


case "E":
        aktuellehoehere[2] = "F" ;
        break;


case "F":
        aktuellehoehere[2] = "0";

switch( aktuellehoehere[3] )
{
case "0":
aktuellehoehere[3] = "1" ;
break;


case "1":
        aktuellehoehere[3] = "2" ;
        break;


case "2":
        aktuellehoehere[3] = "3" ;
        break;


case "3":
        aktuellehoehere[3] = "4" ;
        break;


case "4":
        aktuellehoehere[3] = "5" ;
        break;


case "5":
        aktuellehoehere[3] = "6" ;
        break;


case "6":
        aktuellehoehere[3] = "7" ;
        break;


case "7":
        aktuellehoehere[3] = "8" ;
        break;


case "8":
        aktuellehoehere[3] = "9" ;
        break;


case "9":
        aktuellehoehere[3] = "A" ;
        break;


case "A":
        aktuellehoehere[3] = "B" ;
        break;


case "B":
        aktuellehoehere[3] = "C" ;
        break;


case "C":
        aktuellehoehere[3] = "D" ;
        break;


case "D":
        aktuellehoehere[3] = "E" ;
        break;


case "E":
        aktuellehoehere[3] = "F" ;
        break;


case "F":
        aktuellehoehere[3] = "0";

switch( aktuellehoehere[4] )
{
case "0":
aktuellehoehere[4] = "1" ;
break;


case "1":
        aktuellehoehere[4] = "2" ;
        break;


case "2":
        aktuellehoehere[4] = "3" ;
        break;


case "3":
        aktuellehoehere[4] = "4" ;
        break;


case "4":
        aktuellehoehere[4] = "5" ;
        break;


case "5":
        aktuellehoehere[4] = "6"
        break;


case "6":
        aktuellehoehere[4] = "7"
        break;


case "7":
        aktuellehoehere[4] = "8"
        break;


case "8":
        aktuellehoehere[4] = "9"
        break;


case "9":
        aktuellehoehere[4] = "A" ;
        break;


case "A":
        aktuellehoehere[4] = "B" ;
        break;


case "B":
        aktuellehoehere[4] = "C" ;
        break;


case "C":
        aktuellehoehere[4] = "D" ;
        break;


case "D":
        aktuellehoehere[4] = "E" ;
        break;


case "E":
        aktuellehoehere[4] = "F" ;
        break;


case "F":
        aktuellehoehere[4] = "0";

switch( aktuellehoehere[5] )
{
case "0":
aktuellehoehere[5] = "1" ;
break;


case "1":
        aktuellehoehere[5] = "2" ;
        break;


case "2":
        aktuellehoehere[5] = "3" ;
        break;


case "3":
        aktuellehoehere[5] = "4" ;
        break;


case "4":
        aktuellehoehere[5] = "5" ;
        break;


case "5":
        aktuellehoehere[5] = "6" ;
        break;


case "6":
        aktuellehoehere[5] = "7" ;
        break;


case "7":
        aktuellehoehere[5] = "8" ;
        break;


case "8":
        aktuellehoehere[5] = "9" ;
        break;


case "9":
        aktuellehoehere[5] = "A" ;
        break;


case "A":
        aktuellehoehere[5] = "B" ;
        break;


case "B":
        aktuellehoehere[5] = "C" ;
        break;


case "C":
        aktuellehoehere[5] = "D" ;
        break;


case "D":
        aktuellehoehere[5] = "E" ;
        break;


case "E":
        aktuellehoehere[5] = "F" ;
        break;


case "F":
aktuellehoehere[5] = "0";
break;
}
break;
}
break;
}
break;
}
parent.fenster.document.write('</tr><tr>');
break;
}
break;

case 16:

if( aktuellehoehere[5] == "F" && aktuellehoehere[4] == "F" && aktuellehoehere[3] == "F" && aktuellehoehere[2] == "F" && aktuellehoehere[1] == "F" && aktuellehoehere[0] == "F" )
{
parent.fenster.document.write('</tr></table></center></body></html>');
parent.fenster.document.close();
alert('fertig !');
}else
parent.stand.document.open();
parent.stand.document.write(aktuellehoehere[5] + aktuellehoehere[4] + aktuellehoehere[3] + aktuellehoehere[2] + aktuellehoehere[1] + aktuellehoehere[0]);
parent.stand.document.close();
setTimeout('colortable()',1);
break;

default:
alert('fehler');
break;
  }
  }
  }
</script>
</HEAD>
<BODY>
<input type="button" name="" value="test" onClick="colortable()">
</BODY>
</HTML>
 
Zuletzt bearbeitet:
Gaaaaanz kleiner Fehler,

du öffnest hinter jedem switch eine geschweifte Klammer, machst sie aber nach dem letzten case nicht wieder zu. Vielleicht liegts daran.
 
Zurück
Oben