View Full Version : text field and select field dependence

07-31-2008, 10:01 AM
Hi guys! I want to create a form whereby whenever a value is selected from a list of select field it's corresponding value should appear on the text field.
example,if the select field has a list of file numbers,then if a certain file number is selected the corresponding file name should apppear on the text field

07-31-2008, 10:11 AM
Hope this basic example keeps you going:

<script type="text/javascript">
var opt=document.getElementById('field');
<label for="field">Select Field:</label>
<select id="field">
<option>Value 1</option>
<option>Value 2</option>
<option>Value 3</option>
<option>Value 4</option>
<option>Value 5</option>
<option>Value 6</option>
<input type="text" id="show">

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum