php and javascript and listboxes.?

evachick156

New member
Im trying to populate to list boxes using one javascript function.

php:
echo("<Select MULTIPLE onchange='getMedia(" . $rows['id'] . ")' name='" . $rows['id'] . "_teach' id='" . $rows['id'] . "_teach'>");
echo("<Select>");
?>
<br />
<?
echo("<Select MULTIPLE onchange='getMedia(" . $rows['id'] . ")' name='" . $rows['id'] . "_pract' id='" . $rows['id'] . "_pract'>");
echo("<Select>");

Here is javascript:
teach.options[0] = new Option("Simple diagrams", "a1");
teach.options[1] = new Option("Statements of associations", "a2");
//Practice
pract.options[0] = new Option("Activities that integrate", "b1");


The weird thing is if i take out "MULTIPLE" it works fine but it becomes a drop down, but i just want a list box so they can select multiple.
 
Back
Top