I’m trying to enable a editable text box where on entering the first two digits the values get filtered to the matching ones sort of thing for an existing drop down menu but i seem to be getting no where with that.It would be wonderful if someone could help me out with this issue.
<td>
Part Number
</td>
<td>
<select class=\"".$klasse_ausw["aggregat_ausw_drpd"]."\" name=\"aggregat_ausw_drpd\" style=\"width:90pt; size:1;\">
<option value=></option>";
$sql_aggregat_ausw3_drpd="SELECT * FROM vers_einl_aggregatnummer ORDER BY vers_einl_aggregatnummer.aggr_nr ASC";
$result_aggregat_ausw3_drpd=mysql_query($sql_aggregat_ausw3_drpd);
while($row_aggregat_ausw3_drpd=mysql_fetch_array($result_aggregat_ausw3_drpd)){
extract($row_aggregat_ausw3_drpd, EXTR_PREFIX_ALL, "ausw3");
echo ' <option value="'.$ausw3_id.'"';
if(($_POST["aggregat_ausw_drpd"]==$ausw3_id) || ($_GET["aggregat_ausw_drpd"]==$ausw3_id)){
echo ' selected';
}
echo ' >'.$ausw3_aggr_nr.'</option>';
}
echo "</select></td></tr>
If i understand correctly, you’re looking for a way to filter a select box.
There’s a number of ways to achieve this through Javascript.
The Select2 jquery plugin is pretty good.