field then the drop down list related to that value should get updated...
e.g
if i type Mr. in input field the from drop down Mr. should get selected...
if typed Dr then from option Dr. should get selected..
- Code: Select all
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function() {
// initialize the value of the input field to the selected value
// of the dropdown list:
$('#gift_title').val($('#title').val());
$('#title').change(function() {
// when the value of the dropdown list changes
// update the input field
$('#gift_title').val($(this).val());
});
});
</script>
<html>
</body>
<select name="title" id="title">
<option <a href="abstract.jpg">Mrs</a></option>
<option value="Mr" >Mr</option>
<option value="Miss" >Miss</option>
<option value="Dr" >Dr</option>
<input type="text" name="gtitle" id="gift_title" a href="" />
</select>
</body>
</html>

