Ich habe hier einen BBCode, dieser funktionierte Monatelang in einem 3.1 Forum ohne Probleme. Nun Funktioniert der Teil mit dem JavaScript nicht mehr.
Code: Alles auswählen
<body onload="resize()">
<div align="center">
<div id="brief">
<div class="brieftop"></div>
<div id="brief" class="briefcontent"><div style="max-width: 460px;">{TEXT}</div></div>
<div class="briefbottom"></div>
</div>
</div>
</body>
<script type="text/javascript">
// Funktion resize (Größeneinstellung)
// varHeight = Variable mit der die neue Höhe berechnet wird
function resize(){
varHeight = document.getElementById('briefcontent').clientHeight;
if (varHeight%130 > 0){
varHeight = ((varHeight/130 | 0)+1)*130;
}
document.getElementById('briefcontent').setAttribute('style','height:'+varHeight+'px');
}
</script>
Code: Alles auswählen
[brief]Text[/brief]
Grüße Werwolf