I tried every way I could find on the web, java scripts, jquery ..you name it. So tried in php, as per beneath, but no joy,..anyone please *note: $_GET["sel"] has a value, retrieved from a hidden input, which was set correctly by javascript in the onchange ="SetDDLValueOnChange(this).* Thx
<dl>
<dt>Select a Menu Item before setting it's Fillings </dt>
<dd style=" margin: 0; " >
<select name="MenuItems" id="MenuItems" onchange="SetDDLValueOnChange(this);">
<?php
/*** query the database ***/
$mySelects = $wpdb->get_results("SELECT MI_Id, MI_Descr, Express FROM
wp_sb_menuitems");
foreach ($mySelects as $row)
{
if ($_GET["sel"] == $row->MI_Id)
{
?>
<option selected="selected" value="<?=$row->MI_Id;?>[<?=$row->MI_Id;?>]"> <?=$row->MI_Descr;?>
</option>
<?php
}
else
{
?>
<option value="<?=$row->MI_Id;?>[<?=$row->MI_Id;?>]"> <?=$row->MI_Descr;?> </option>
<!-- The above creates an associative array of the options, such that the individual elements of the drop down,
eg the Id and Descr can be accessed seperately -->
<?php
}
}
?>
</select>
</dd>
</dl>