Can you guys help me on this:

Miscellaneous Forums/General Discussion/Can you guys help me on this:

I'm a total bozo when it comes to Javascript.
But I'm sure there are people here who do understand it.


I've coded a small shoutbox for a forum I'm a member off.
The shoutbox does support smileys by :) codes it transforms into it.

Now they have asked me if it could be possible that I made clickable smileys putting the code into the text. You got what I mean?

Problem is that that requires Javascript and as I said, I SUCK at Javascript. Can somebody provide me with a script that can do that?

You got what I mean?
Not really, no.

Problem is that that requires Javascript
Why? I wouldn't recommend using JavaScript if you don't understand what it does.

And now somebody who can help me....
Remarks like don't use Javascript if you don't understand it, is something that doesn't work for me. So only INTELLIGENT remarks please!

You know such forums like phpBB were a buch of smileys are printed beside the message field being implemented in your message when you click on them. All I need is a script that can do that. Nothing more nothing less.

I dunno too much about javascript coding but i did something similar with ASP.NET a while back. Make each simley an image button, and for each smiley assign them a clickevent based on the type of smiley to call a function sorta like this :

<script>
 function MakeSmiley(val)
  {
    switch(val)
       1 : document.forms['myForm'].elements['myTextArea'].value += ":)";
            break;
       2 : document.forms['myForm'].elements['myTextArea'].value += ":D";
            break;
       3 : document.forms['myForm'].elements['myTextArea'].value += ":(";
            break;
       4 : document.forms['myForm'].elements['myTextArea'].value += ":P";
            break;
       5 : document.forms['myForm'].elements['myTextArea'].value += ":/";
            break;
       default : break;

  }
</script>
So a happy face smiley would have an onClick="MakeSmiley(1)" event...and so forth.

And now somebody who can help me....
Oh but I can help you. I just chose not to.

Remarks like don't use Javascript if you don't understand it, is something that doesn't work for me.
But getting your forum exploited because you're copy/pasting other peoples code is fine and dandy?

Putting all ultra-dumb notes aside to which I'm not gonna reduce myself to note any further I thank you Neuro for your help.