Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-26-2005, 02:22 AM
WebProWorld New Member
 

Join Date: Jan 2005
Posts: 21
Andre_Vas RepRank 0
Default How to insert a variable ANYWHERE in a TEXTAREA of a form?

Hi guys,

Here's a challange for you, as it's most cerainly
for me:

I want to allow an affiliate to enter his/her
affiliate number in a small form field.

When they press "Submit" this number will
automatically be inserted in a "textarea" of a form.

Here's an example:
--------------------

<textarea name="image1" id="image1">

Click here to find out more...

</textarea>

-=-=-=-=-=-=-=-=-=-=-=-=

Now how would I get that "XXXXX" to be substituted
by the affiliate number or just any variable that
was entered and submitted??

Tough one hey! :-)

Thank you soooo much for your help. Also please
give me an example of the code of how I would do it.



Andre Vas
__________________
Join The World's Most Profitable Affiliate Program:

==> http://assoc.speedsuccess.com
Reply With Quote
  #2 (permalink)  
Old 03-29-2005, 07:02 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 

Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,217
ADAM Web Design RepRank 0
Default

Code:
function fillTextArea(affiliateID) {
   var theForm = document.forms[0];
   var textAreaFill = (your code here)
   theForm.image1.value = textAreaFill;
   return true;  (you need this part to return the value to the form like you'd like);
}
Then you'd just call that using an onSubmit.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0