I am attempting to change the value of a text input based on the user selecting a value from a pulldown. I have got it working using the following,
Try this,
$(document).ready(function() { $("#name option").filter(function() { return $(this).val() == $("#firstname").val(); }).attr('selected', true); $("#name").live("change", function() { $("#firstname").val($(this).find("option:selected").attr("value")); }); });
Please select... Elvis Frank Jim