Veröffentlicht 25. Juni 200718 j Ich fülle per Javascript eine Listbox (also ein select) for (var i in result) { var opt = new Option(); opt.text = result[i].Text; opt.value = result[i].Value; opt.title = result[i].Title; if (result[i].Value == ID) { opt.style.color = "red"; opt.style.fontWeight = "bold"; opt.style.fontStyle = "italic"; opt.disabled = true; } c.ListBox1.options[c.ListBox1.length] = opt; } [/PHP] Dabei werden die Einstellungen in der if Abfrage im IE7 bis auf die Farbe nicht übernommen. Im Firefox klappt das korrekt, das heißt die Option ist rot, kursiv, fett und deaktiviert. Warum ist sie im IE nur rot?
25. Juni 200718 j Ich bin nun nicht so JS-firm, aber heißts im CSS nicht font-weight und font-style - also mit Bindestrichen?
25. Juni 200718 j Autor Nein, wenn man es so setzen will anscheinen nicht. Aber das disabled wird im IE ja komischerweise auch nicht übernommen
Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.