Hello anyone knows a good way to refresh a DropDown Select Menu after it has
been updated ?
It is a PHP dynamic populated menu. The user has the option to add a new
category So he clicks the Add new category button and once it is added I go
back in history <script language="javascript"
type="text/javascript">history.go(-2);</script> Which is not the most
appropriate way I suppose.
And the menu in the form just needs a refresh to get the new values..
Any ideas of how to do that ?
Here is the code..
If you didn't understand what I am trying to do, let me know ! Thanks for
that
<td>
<select name="products_category_id"><?php
do { ?>
<option value="<?php echo
$row_rs_product_categories['product_categories_id']?>">
<?php echo
$row_rs_product_categories['product_categories_name']?></option>
<?php
} while ($row_rs_product_categories =
mysql_fetch_assoc($rs_product_categories));
$rows = mysql_num_rows($rs_product_categories);
if($rows > 0)
{
mysql_data_seek($rs_product_categories, 0);
$row_rs_product_categories = mysql_fetch_assoc($rs_product_categories);
}
?>
</select>
<a href="content.php?action=add&contCat=product_categ ories">add Category</a>
(Please Click
<a href="javascript:history.go(0)">refresh categories</a>) </td>