ok, lets say i have a form and on the form i want to insert some text using javascript. i created this simple code to show you how you can add text into a form using javascript
<script language="JavaScript" type="text/JavaScript">

function AddItem(ItemId)
{
document.Form.bible_verse_description.value = document.Form.bible_verse_description.value + '<' + ItemId;
}

</script>
<form id="Form" name="Form" method="post" action="/jesuswillcome/bible/add-verse.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100">&nbsp;</td>

<td width="15">&nbsp;</td>
<td width="5">
<a href="#" onclick="AddItem('span style=&quot;color:#ff0000&quot;\>');">open span</a>&nbsp; &nbsp;
<a href="#" onclick="AddItem('/span\>');">close span</a> &nbsp; &nbsp;||| &nbsp; &nbsp;

<a href="#" onclick="AddItem('em\>');">Open Italic</a>&nbsp;&nbsp;
<a href="#" onclick="AddItem('/em\>');">close italic</a>

<BR></td>
</tr>
<tr>
<td>Verse</td>
<td>&nbsp;</td>
<td><textarea tabindex="1" name="bible_verse_description" cols="45" rows="5" id="bible_verse_description"></textarea></td>
</tr>
</table>
</form>


DEMO:
    open span    close span    |||     Open Italic   close italic
   

if you have a website and need web hosting, i always recommend a trusted web hosting place is always Webune.com
I hope this helps