View Full Version : Clicking image write text to inputbox

01-09-2004, 10:32 PM
I have a chat application going, and just like the messageboard here, where you click the emoticons on the left of the message and it inserts the text, I want to do the same thing. The only difference is my emoticon box is in a separate window (popUp via javascript). So far I tried this:

<a href="#" onClick="parent.document.sendreceive.message.value=':-D'; parent.document.sendreceive.message.focus()"><img border=0 src=chats/emoticons/biggrin.gif alt=":-D"></a>

Form name is "sendreceive"
Text area name is "message"

With no luck. :(

Any ideas? :)

01-09-2004, 10:37 PM
Nevermind I figured it out. The answer was to use "opener" instead of "parent" :)