Click to See Complete Forum and Search --> : [RESOLVED] JavaScript help


EPJS
01-07-2007, 09:02 PM
See like here when you click on a smilie it's entered in the textarea for you?

Look here: http://projects.ninty.xenweb.net/guest1.html


How can I make it so the smilies are entered when I click on them, rather than typing them in manually?

theelectricwiz
01-08-2007, 01:12 AM
something like

<a onclick="insert(':)');">:)</a>
<script>
function insert(smilie) {
document.getElementById('textbox1').value += smilie;
}
</script>

should work

EPJS
01-08-2007, 01:46 AM
Thanks, that worked :)