hello.. i will give u right away the code, and then explain u my problem..


this is a part of the php code that concern us.. this code is about showing the showing the fields of a table in a dropdown menu..
Code:
echo <<< END_FORM2

<h2 align="left">Modify Charts</h2>
<hr />
<form method="post">
<textarea cols="40" id="put" rows="3" name="chart2"></textarea>
<p>
<label> Charts: </label><select name="charts_idd" onchange='returnValues()'>
<option value="">Please Choose A Chart</option>
END_FORM2;

$sql='SELECT * from charts';
  @ $result = mysql_query($sql);
	while ($row = mysql_fetch_array($result)){
	echo "<option id='give' value=\"$row[charts_id]\">$row[charts_desc]</option>";}

echo "</select><input type=\"submit\"value=\"Change It\" /></p></form>";
}
this is the javascript code. what im trying to do here is, when i choose something from the dropdown menu, i want the chosen option to be displayed in the textarea. this has to do with modifying the charts of a table called charts. so, u choose a chart from the dropdown menu, the chart u choose will be displayed in the textarea and then u can modify it and click on the change it value to be changed..

Code:
<script>
  function returnValues()
  {
  var values=document.getElementById('give').innerHTML;
  
  document.getElementById('put').innerHTML=values;
  }
  </script>
my problem is that i have a mistake somewhere and each option i choose from the dropdown menu, it will always display the first option in the textarea..

any solutions please? any help will be highly appreciated.. take a look at the photos below to understand what im trying to do..

thank u in advance

first.JPG second.JPG third.JPG fourth.JPG