Sto lavorando con Javascript, è il primo giorno che mi ci trovo, ecco quello che ho scritto:

if(msg.length>92){
dd.appendChild(msg.substring(0,92));
}else{
dd.appendChild(msg);
}

Ecco l'errore:
There has been a JavaScript error. Error: msg.substring is not a function Line: 941 File: http://localhost/phpBB3/ajax.php?m=js

che è?