<tr>
    <td class="tdLabel"><label for="myFavouriteFruit" class="label">My Favourite Fruit:</label></td>
    <td>
<script type="text/javascript">
	function autoPopulate_myFavouriteFruit(targetElement) {
		if (targetElement.options[targetElement.selectedIndex].value == '-1') {
			return;
		}
		if (targetElement.options[targetElement.selectedIndex].value == '') {
		    return;
		}
		targetElement.form.elements['myFavouriteFruit'].value=targetElement.options[targetElement.selectedIndex].value;
	}
</script>
<input type="text" name="myFavouriteFruit" value="banana" id="myFavouriteFruit"/><br/>
<select onChange="autoPopulate_myFavouriteFruit(this);">
	<option value="-1">--- Please Select ---</option>
	<option value=""></option>
    <option value="apple">apple</option>
    <option value="banana" selected="selected">banana</option>
    <option value="pineaple">pineaple</option>
    <option value="grapes">grapes</option>
</select>
    </td>
</tr>