Ashura: confirm - Zeilenumbruch

Beitrag lesen

Hallo Michael.

var status = confirm("Erste Zeile.\nZweite Zeile\n\nText nach Leerzeile");

Hm, sollte normalerweise auf jeden Fall funktionieren.

Unter IE 6 einwandfrei. Unter FF 1.5 ohne Leerzeile.

Wie sieht es bei alert() aus?

Was ergibt bei dir alert(escape('Foo\nBar'))?
(Es sollte „Foo%0ABar“ ausgegeben werden.)

Wenn dies funktioniert solltest du genau dasselbe bei confirm() probieren.

Und du rufst auch wirklich immer das aktuelle Dokument, also auch nicht aus dem Cache auf, oder? (Obligatorische Frage.)

Einen schönen Mittwoch noch.

Gruß, Ashura

--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]