Could someone explain how to...

Hmm, I see the smilies here do what I'm wanting to do, but I don't understand the code.


I'm wanting to do something exactly like on the response page on this forum, where you click the smiley face and it enters the code for it into the textarea. (But it's for another feature, not smilies.)

Could someone give a brief explanation of the coding needed to do this?

I'm seeing the javascript:smilie(':)') in the href tag, but I don't see how it is specifying where to place the text. I know there's gotta be more to it than that!