<script> function InsertEmoticon(filename){ document.getElementById('textbox_id').value+="<img src='"+filename+"'>" } </script>