Its very simple - you can just use a ajax call and write it on change like this
<select class="selectbox" name="mydropdown">
<option value="Milk">Fresh Milk</option>
<option value="Cheese">Old Cheese</option>
<option value="Bread">Hot Bread</option>
</select>
<script>
$(document).ready(function(){
$(".selectbox").change(function(){
var itemId = $(this).val();
$.post( "ajax/getprice.php",{id : itemId }, function( data ) {
$( "#anotherfieldId" ).val( data );
});
});
});
</script>
You can write your query to process and get the value in "ajax/getprice.php"
"data" is what you get in return