Changing text upon selecting from a drop-down menu

On a page for product descriptions, I have a MySQL query that returns a list of purchase options and the price of each option.

There is a drop-down field which lists the names of each option. To the right, the price of the selected option is displayed.

Upon selecting a different option, how can I have the displayed price change to that of the newly selected option?

I dont remember the javascript function properly, You can search for selected index for dropdown menu. After selecting it you can change the value of the textbox or other selectbox value.

Start from a point of no scripting, because you will have people in that situation.

When the drop-down field is changed, you need a submit near it to update the page prices, so that the server-side can update the on-screen prices.

Then, you can use javascript to update the prices without the page refresh, buy taking over the onsubmit event for the price update. You can then either do the work separately from javascript, or you can use ajax to fetch the updated prices from the server.