PDA

View Full Version : i want to put some code ( by click on picture) on the text area


php4dev
09-04-2005, 01:44 AM
hello ..

i want to make new file inside it text area and above text area some pictures , every picture have a little code , if you click on the picture , its code will written on the text area .

It is like smilies idea ...

please help me to do this or give me any example .

Best Regards

Marco van Herwaarden
09-04-2005, 05:15 AM
Just look at the source of a thread here at vb.org. Look how the Arraow down icon in a post (the one next to quote) is handled.

php4dev
09-04-2005, 01:52 PM
Do you mean this ?

<!-- standard quick reply -->

<div id="controlbar">
<table cellpadding="0" cellspacing="0" border="0">
<tr>

<td><div class="imagebutton"><a href="#" onclick="return vbcode('B', '')"><img src="images/editor/bold.gif" alt="Bold" width="21" height="20" border="0" /></a></div></td>
<td><div class="imagebutton"><a href="#" onclick="return vbcode('I', '')"><img src="images/editor/italic.gif" alt="Italic" width="21" height="20" border="0" /></a></div></td>
<td><div class="imagebutton"><a href="#" onclick="return vbcode('U', '')"><img src="images/editor/underline.gif" alt="Underline" width="21" height="20" border="0" /></a></div></td>
<td><img src="images/editor/separator.gif" alt="" width="6" height="20" /></td>

<td><div class="imagebutton"><a href="#" onclick="return vbcode('QUOTE', '')"><img src="images/editor/quote.gif" alt="Wrap [QUOTE] tags around selected text" title="Wrap [QUOTE] tags around selected text" width="21" height="21" border="0" /></a></div></td>
</tr>
</table>
</div>

<div class="controlbar">
<textarea name="message" id="qr_message" class="bginput" style="width:600px; height:100px" cols="60" rows="5" tabindex="1"></textarea>
</div>

<script type="text/javascript" src="clientscript/vbulletin_editor.js"></script>
<script type="text/javascript" src="clientscript/vbulletin_stdedit.js"></script>

<!-- / standard quick reply -->

i put this code in new file but it is didn't work ..

if you don't mean this please tell what did you mean ?


thanks

Marco van Herwaarden
09-04-2005, 04:43 PM
This line is handling it:
<a href="newreply.php?do=newreply&amp;p=767717" onclick="return doMultiQuote('MarcoH64', 767717);"><img src="images/smoothblue/buttons/quickreply.gif" alt="Quick reply to this message" border="0" /></a>
Tohether with a JavaScript piece i didn't see so fast.

php4dev
09-12-2005, 01:09 AM
I couldn't do it ....

if you can : please make a new file includes a textarea and some buttons above it ..

Thank you very much for your help