javascript onchange query issue
<p>I have the following javascript at the head of my file.</p>

<pre><code>&lt;?php
echo "&lt;script language='JavaScript'&gt;\n";
echo "var times = new Array();\n";
echo "times[0] = 0;\n";
foreach($times as $time)
{
echo "times[". $time-&gt;DESC ."] = " . $time-&gt;FEE . ";\n";
}
echo "&lt;/script&gt;\n";
?&gt;
</code></pre>

<p>i then have a dropdown, where the options are the same $time->DESC,</p>

<p>i have an onchange, and i want to set another text box value to equal the PBT_FEE according to the PBT_DESC</p>

<p>i have</p>

<pre><code>onchange="document.getElementById('Price').value = times[this.value];"
</code></pre>

<p>i presume that times[this.value] should call for the fee according to the matching descriptions, but i get no output</p>
