Manipulate Drop-Down List
Posted: Mon Feb 22, 2010 3:00 pm
How to call a PHP Function, defined in the same PHP Web Page, on a control's events such as onChange even of select tag?
Example:
Here, I want to manipulate another "select" list "<select name='Items'>" depending upon which Group is selected above. How to achieve it?
I think that onChange event of the first select list I need to call a Function that can manipulate the 'Items' list.
It is just like how it happens on web pages when you select a "State" and corresponding "City" is displayed in another Drop-Down List.
Any help?
Example:
Code: Select all
Support Group <select name="Group">
<?php
while (!$rs->EOF) {
echo '<option value="' . trim($rs->Fields['supportGroup']->Value) . '">' . trim($rs->Fields['supportGroup']->Value) . '</option>';
$rs->MoveNext();
}
?>
</select>
I think that onChange event of the first select list I need to call a Function that can manipulate the 'Items' list.
It is just like how it happens on web pages when you select a "State" and corresponding "City" is displayed in another Drop-Down List.
Any help?