I am new to AJAX and trying to figure out how to trigger an event when an option is selected from a drop-down menu. I'm using php to create the list so an id is associated with each option. I've used the getText() function for other AJAX applications so that part is good. For the other applications I used separate listed options and submit button. For this application I would like to just use a drop-down menu instead. Thoughts?

echo "<form><select>";
while($row=mysql_fetch_array($result, MYSQL_ASSOC))
{ $commodity = $row['commodity']; $id = $row['id'];
echo "<option onselect = \"getText('../8jsdr7u25o9pt89p489h342678pkhj/usershowcontract.php?id=$id', 'showcontract')\">$commodity</option>";
}}
echo "</select></form>";