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
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  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: insert text into form using javascript php put content in textarea field link Javascipt
Post Tags:
This Post Has Been Viewed 5727 Times Since Sun Jun 03, 2007 7:44 am Author hostman with 11 replies
insert text into form using javascript PHP put content in textarea field link
Advertise On This Page




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

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
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
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : insert text into form using javascript PHP put content in textarea field link

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
user:
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
dave:
awesome script, just what i was looking for. thx!!
:: 3 :: Reply #57494 Reply By hampus On Thu Jun 12, 2008 6:50 am
hampus:
20080612-57494-terrestrial-ver3.jpg
hehe. snyggt ;d
:: 4 :: Reply #63383 Reply By arturoz On Sat Jul 26, 2008 7:01 am
arturoz:
yeah! thanks man! i was looking for this ;]
i appreciate your work!
:: 5 :: Reply #98667 Reply By french On Sun Mar 29, 2009 2:59 pm
french:
insert into outfile avec textarea et mysql db
:: 6 :: Reply #104375 Reply By pondza On Tue May 26, 2009 9:09 am
pondza:
it's work very well. thanks you.
:: 7 :: Reply #105472 Reply By Earth On Sat Jun 06, 2009 10:13 am
Earth:
cool!! nice tutorial!!!
:: 8 :: Reply #107824 Reply By Olland On Mon Jun 29, 2009 9:51 pm
Olland:
good good good...
good good good...
good good good...
good good good...
good good good...
good good good...
good good good...
:: 9 :: Reply #116441 Reply By Craig On Fri Sep 25, 2009 11:10 am
Craig:
i think this might work for me but i need help!! :)

i have a photo gallery that automaticly creates the thumnail page and i've added a cheezy light box and now i'm trying to add a "order prints" button and i've got it to open another html or php page that i want to put the file name into a field the user can not edit.... but i can't get from link to the window to the field?

any help would be appreciated

thank you
:: 10 :: Reply #116442 Reply By Craig On Fri Sep 25, 2009 11:10 am
Craig:
i think this might work for me but i need help!! :)

i have a photo gallery that automaticly creates the thumnail page and i've added a cheezy light box and now i'm trying to add a "order prints" button and i've got it to open another html or php page that i want to put the file name into a field the user can not edit.... but i can't get from link to the window to the field?

any help would be appreciated

thank you
:: 11 :: Reply #119075 Reply By Kitgg On Thu Oct 29, 2009 10:23 am
Kitgg:
wow! love it, very simple, you good!