Hi,
benutzt den IE ??
dann schau dir mal deinen Code an:
function init(){
if(document.all) dall = true;
else{
if(document.layers) dlay = true;
else{
if(document.getElementById) deid = true;
}
}
}
IE >=5.0 kennt sowohl das all-Objekt wie auch getElementById()
d.h. deid wird nie true im IE!
function topic(value){
if(dall) document.all.top.innerText = value;
else if(dlay) document.top.innerText = value;
else if(deid) alert(document.getElementById('top').innerText);
}
daher kommt hier auch kein alert() im IE !!!
Noch was: NS4 (document.layers) unterstütz NICHT die Eigenschaft innerText. Und nimm lieber innerHTML, das ist in deinem Beispiel egeal, da du eh nur Text übergibst (in value). Aber innerHTML wird von mehr Browser sicherer interpretiert.
Gruß
Christian