Yooohooo!! Hab's selber geschafft!
Danke AB, aber mit ID-Tag hat das nichts zu tun gehabt!
Ich weiß aber, dass ich diesen auch noch brauchen werde, aber jetzt hab ich endlich schonmal das automatische Lesen der Werte.
Hier der Quelltext:
<script type="text/javascript">
<!--
// Configuration
bgColor = "#A4A4A4";
borderColor = "#FFFFFF";
fontFace = "Arial";
fontSize = "2";
fontColor = "#6E6E6E";
normalItem = "#A4A4A4";
hilightItem = "#FFFFFF";
// - - - - - - -
function makeItem() {
var Item = new Array();
Item[0] = ["Startseite", "index.htm", "News", "news.htm"];
Item[1] = ["Auftrag", "auftrag.htm", "Progr. Sprach.", "progr_spr.htm", "Grafikdesign", "grafikdesign.htm"];
Item[2] = ["JS FADE", "js_fade.htm", "JS MENU", "js_menu.htm"];
Item[3] = ["Demovorlagen", "demovorlagen.htm", "Referenzliste", "referenzliste.htm"];
Item[4] = ["Kontaktformular", "kontaktformular.htm", "Impressum", "impressum.htm"];
for(var i = 0; i < Item.length; i++) {
Menu = new Array;
Menu[i] = "<table width="102" bgcolor="" + bgColor + "" cellspacing="0" cellpadding="3" style="border-bottom: 1px solid " + borderColor + "; border-left: 1px solid " + borderColor + "; border-right: 1px solid " + borderColor + ";">";
for(var j = 1; j < Item[i].length; j+=2) {
Menu[i] += "<tr><td style="cursor: hand" onMouseOver="this.style.backgroundColor='" + hilightItem + "';" onMouseOut="this.style.backgroundColor='" + normalItem + "';" onClick="window.location.href='" + Item[i][j] + "';"><font face="" + fontFace + "" size="" + fontSize + "" color="" + fontColor + "">" + Item[i][j-1] + "</font></td></tr>";
}
Menu[i] += "</table>";
document.write(Menu[0]); // Wo null steht, kann ich nun eines der oben stehenden ITEMS >EINZELN< auslesem lassen. Sonst standen nämlich immer alle da.
}
}
makeItem();
//-->
</script>
Trotzdem nochmal ein riesengroßes DANKESCHÖN!
Gruss ali ;-))