Hi
Please see the following simple script:
<TD align="Left" width="30%" >
<select name="DEPARTMEN T" SIZE ="1" style="width:20 0px;"
onChange="Chang e()">
<option value="0"> <ALL>
<option value="1000012" >Food Sales
<option value="1000014" >Dessert Sales
<option value="1000015" >Liquor Sales
<option value="1000016" >Beer Sales
<option value="1000017" >Wine Sales
<option value="1000226" >Merchandise Sales
<option value="1000227" >Clothing Sales
....
</select>
</TD>
<TD align="Left" width="30%" >
<select name="CATEGORY" SIZE ="1" style="width:20 0px;" onChange="">
<option value="0"> <ALL>
<option value="1000012. 1" >D - Classic Recipes
<option value="1000012. 2" >D - Carne & Pollo
<option value="1000026. 41" >D - Filled Pastas
<option value="1000011. 42" >D - Seafood
<option value="1000143. 1" >D - Salads
<option value="1000147. 2" >D - Pastas & Sauces
<option value="1000148. 4" >D - Daily Specials
<option value="1000049. 2" >L - Salads
....
</select>
</TD>
<FORM name="InputForm " id="InputForm" >
<INPUT TYPE="HIDDEN" NAME="DEPARTMEN T" VALUE="">
<INPUT TYPE="HIDDEN" NAME="CATEGORY" VALUE="">
function Change()
{
var selIndex = document.getEle mentById('DEPAR TMENT').selecte dIndex;
var selValue =
document.getEle mentById('DEPAR TMENT').options[selIndex].value;
.....???
my question is, how to modify the change(), so that whenever select 1
department, the category list will show those items which have a prefix
value as the selected department? (ex. value in department 1000012, has
2 category 1000012.1 and 1000012.2 in above case).
--
Thanks lots
John
Toronto