Provato su IE e Firefox:
codice:
<script type="text/javascript">
<!--
function aggiungiSmile(parametro){
document.invio_chat.chat.value=document.invio_chat.chat.value+parametro;
document.invio_chat.chat.focus();
var pos = document.invio_chat.chat.value.length;
if(document.invio_chat.chat.setSelectionRange)
{
document.invio_chat.chat.focus();
document.invio_chat.chat.setSelectionRange(pos,pos);
}
else if (document.invio_chat.chat.createTextRange) {
var range = document.invio_chat.chat.createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStart('character', pos);
range.select();
}
}
//-->
</script>
HTH
Zappa