On change of the dropdown list, A php function should called.
Inside the PHP function I will do some calculation. Later I need to set the value of a text box or else
Insert your function in a php file to excute , then you could call php file with ajax ( i suggest u use jQuery )
///////////////////////// foo.php ///////////////////// text.html ..... . . . .