You will definitely need a server-side language to get info from a database. pHp with MySQL is great. If you have a dropdown (select) you can use AJAX to retrieve info into a textarea.
I suggest that you use something like the Prototype library to deal with the ajax implementation.
1. Download this from
http://www.prototypejs.org (currently version 1.6).
2. Place this file into a folder, e.g. "/js/"
3. Create a new js file, e.g. custom.js and place it in the same folder.
4. Link the two js files to the php file's head area.
5. Create the form select widget via php or use static html.
e.g. for php:
<select name="m1" id="m1" onchange="popMe();return false">
<?php
$q = "SELECT * FROM table...";
$r = mysql_query($q);
while($d = mysql_fetch_array($r)){
output .= "\n\t<option id=\"{d['id']}\">{$d['type']}</option>";
}
echo $output;
?>
</select>
...
<textarea name="notes" id="notes"></textarea>
6. Write the popMe() function in your custom.js file:
function popMe(){
var op = $F('m1');
var url = "/includes/getrecs.php";
var param = "id=" + op;
var oGetInfo = new Ajax.Updater("notes", url,{method: 'post',parameters: param});
}
7. Write the php code for getting the data and call the file getrecs.php.
...DB connection details...
$id = $_POST['id'];
$q = "SELECT info FROM table WHERE id='{$id}'";
$r = mysql_query($r);
$d = mysql_fetch_array($r);
$info = stripslashes($d['info']);
echo $info;
That's it. I haven't checked the code, it's off the top of my head, so there may be typos or something, but it's pretty close.