This is what i'm trying to do i have one html select box that has like the options apple, oranges, bananas. Now i'm trying to have another select box react to what i select in the first one, for example if i select apple i would like the 2nd select box to show, red, green, yellow. and if i select oranges i would likethe second one to just show orange. Now, here's how i'm doing it
<select name=category onchange=change()>
<option value=1>apple
<option value=2>orange
<option value=3>banana
</select>
now i call the function change like
function change(){
<select name=subcategory>
If($category == 1){
print("<option>Red");
print("<option>Yellow");
.....
else if($category ==2){
....
...
}
now the problem i have is i can get the second select to change but the first one won't stay selected, if i select orange the bottom select function will go to the correct one but the top will refresh back to apple. Is there anyway i can make it stay on orange at top? Or is there a place where you can direct me that might help?
thanks