I have the following javascript at the head of my file.
<?php
echo "<script language='JavaScript'>\n";
echo "var times = new Array();\n";
echo "times[0] = 0;\n";
foreach($times as $time)
{
echo "times[". $time->DESC ."] = " . $time->FEE . ";\n";
}
echo "</script>\n";
?>
i then have a dropdown, where the options are the same $time->DESC,
i have an onchange, and i want to set another text box value to equal the PBT_FEE according to the PBT_DESC
i have
onchange="document.getElementById('Price').value = times[this.value];"
i presume that times[this.value] should call for the fee according to the matching descriptions, but i get no output