I have NEVER tried to use AJAX before.
I have a web application that requires the user to select an item from a pulldown.
The first input is a Lot number.
The info to build the select list is generated via an MySQL query.
Now, here's the thing.
There are MANY items in the pulldown (1,000) which is not practical.
I would like to run a query modified by the string they put in the first input box. I'm trying to avoid a page reload.
Here is the input box
<input name="lotno" />
Here is the basic pulldown code:
echo "<option value='void'>--- Select a test ---</option>";
$sql='SELECT distinct `test_templates`.`tempid`, concat(`test_templates`.`assy`," - ",`test_templates`.`testdesc`) as Description
FROM `test_templates` ORDER BY `assy` ASC';
$result = mysql_query($sql);
echo "<option value='".$row."'>";
I would change the above SQL with ...WHERE `lot` like WHATEVER IS IN THE lotno input field.
Then the result of the query would be very limited.
Thanks in adanced.