function Tobreakword (Intlen, id) {
var Obj=document.getelementbyid (ID);
var strcontent=obj.innerhtml;
var strtemp= "";
while (Strcontent.length>intlen) {
Strtemp+=strcontent.substr (0,intlen) + "<br>";
Strcontent=strcontent.substr (intlen,strcontent.length); }
strtemp+= strcontent;obj.innerhtml=strtemp;
}
CSS Enforce line wrapping
forced line wrapping: word-break:break-all;white-space:normal;word-wrap:break-word (table preferably plus table-layout:fixed;)
JS Code
<script>
Function Tobreakword (intlen) {
var Obj=document.getelementbyid ("FF"); br> var strcontent=obj.innerhtml;
var strtemp= "";
while (Strcontent.length>intlen) {
Strtemp+=strcontent.substr (0,intlen) + "
";
Strcontent=strcontent.substr (intlen,strcontent.length);
}
strtemp+= "
" +strcontent;
Obj.innerhtml=strtemp;
}
if (document.getElementById &&!document.all) Tobreakword (radix)
</script>