Insert Text Into Form Using Javascript PHP Put Content In Textarea Field Link

Mobile
feeds
Welcome Login | Register

Insert Text Into Form Using Javascript PHP Put Content In Textarea Field Link
  Forums Index
      » Javascipt Forums
        » » insert text into form using javascript PHP put content in textarea field link



Insert Text Into Form Using Javascript PHP Put Content In Textarea Field Link
Post Description:
Post Tags: insert, text, into, form, using, javascript, php, put, content, in, textarea, field, link, javascript programming, codes, free technical assistance, support and help
This Post Has Been Viewed 5242 Times Since Sun Jun 03, 2007 7:44 am Posted By hostman with 4 replies
Insert Text Into Form Using Javascript PHP Put Content In Textarea Field Link
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



Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About Insert Text Into Form Using Javascript PHP Put Content In Textarea Field Link




:: 1 :: Reply #28500 Reply By user On Tue Nov 20, 2007 9:50 pm
thanks man, was looking for something like this, works like a charm.

appreciate it!
:: 2 :: Reply #40967 Reply By dave On Tue Feb 12, 2008 9:25 pm
awesome script, just what i was looking for. thx!!
:: 3 :: Reply #57494 Reply By hampus On Thu Jun 12, 2008 6:50 am
20080612-57494-terrestrial-ver3.jpg
hehe. snyggt ;d
:: 4 :: Reply #63383 Reply By arturoz On Sat Jul 26, 2008 7:01 am
yeah! thanks man! i was looking for this ;]
i appreciate your work!