I have made a news script and for the comment i want the people to click the image and it inserts the : D or what ever into it.
does any one know the code?
does any one know the code?
| wumingsden wrote: |
| What about TinyMCE ? Its extremely easy to install.
Example: http://tinymce.moxiecode.com/example_full.php?example=true Download: http://tinymce.moxiecode.com/download.php |
| DanielXP wrote: | ||
That a lot of files for what i want it to do |
| Code: |
|
<html> <head> <title>BB-link</title> <script language="Javascript"> <!-- function emoticon(text) { //put a space in front and behind the text (so ':)' becomes ' :) ') text = ' ' + text + ' '; //fetch the content from your textfield message = document.formname.textboxname.value; //add the text to the message in the textfield message += text; //put the message in the textbox again document.formname.textboxname.value = message; //give the focus to the textbox document.formname.textboxname.focus(); } //--> </script> </head> <body> <!-- the function to append the text is called like this: --> <a href="javascript:emoticon(':)')">Place :) in the textfield below<a> <!-- Pay attention to the name of the form and the textarea. They need to match the names in document.formname.textboxname.value --> <form name="formname" action="post"> <textarea cols="60" rows="10" name="textboxname">a smiley will be appended</textarea> </form> </body> </html> |