also ich bin dabei son schönes Javascript Dropdownmenü zu basteln, aber komme irgentwie nicht weiter!
http://www.fst-versand.de/test.html hab das Script mal hochgelanden, ist glaub ich bersser als nen einfaches c&p.
http://forum.de.selfhtml.org/faq/#Q-19
Mal abgesehen, dass ich von solchen Skripten nicht viel halte, ist mir folgendes aufgefallen. Dein Umgang mit arrays ist nicht sonderlich gelungen:
sub2 = new Array(....);
sub2_q = new Array(...)
sub3 = new Array(...);
sub4 = new Array(...);
sub5 = new Array(...);
sub6 = new Array(...);
....
und dann später:
if(wichsub=='0') { tmp = sub0_q[question]; }
if(wichsub=='1') { tmp = sub1_q[question]; }
if(wichsub=='2') { tmp = sub2_q[question]; }
if(wichsub=='3') { tmp = sub3_q[question]; }
if(wichsub=='4') { tmp = sub4_q[question]; }
if(wichsub=='5') { tmp = sub5_q[question]; }
if(wichsub=='6') { tmp = sub6_q[question]; }
ich bin mir sicher, dass es sinnvoller ist ein Array zu benutzen:
sub = new Array();
sub_q = new Array();
sub_q[0] = new Array();
sub_q[1] = new Array();
sub_q[2] = new Array();
...
und dann:
tmp = sub_q[wichsub][question];
noch schlimmer das hier:
if(wichsub == '0') {tmp = sub0[i];}
if(wichsub == '1') {tmp = sub1[i];}
if(wichsub == '2') {tmp = sub2[i];}
if(wichsub == '3') {tmp = sub3[i];}
if(wichsub == '4') {tmp = sub4[i];}
if(wichsub == '5') {tmp = sub5[i];}
if(wichsub == '6') {tmp = sub6[i];}
Wenn das nicht nach einem Array schreit, weiß ich nicht wofür es Arrays überhaupt gibt.
Nur so als Tipp, das würde evtl. deinen Code schon mal übersichtlicher machen.
Struppi.