Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-populate a field from another field

Status
Not open for further replies.

milams

Programmer
May 28, 2004
32
US
Hi all,

I was wondering if anybody would know where I could find some examples of JavaScript code for auto-populating a text area field when an item from a drop down list is selected.

I want to be able to take information that is selected from the drop down list and automatically put it in a text area field. Would some one know where I could find some examples on how to do this?
 
here's an example:

Code:
<form name="f">
  <select name="s" onchange="this.form.t.value=this.value;">
    <option value=""></option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
  </select>
  <input type="text" name="t" />
</form>



*cLFlaVA
----------------------------
[tt]( <P> <B>)13 * (<P> <.</B>)[/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Fantastic! That was a lot of help. Thanks again cLFlaVA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top