View Full Version : help with option

01-28-2003, 09:54 PM
im trying to add ifs to a shopping cart. basically what i want is if a certain option is picked then i want it to be able to show or not show another option.

say i have 25 colors and they are available in 10 different sizes but only 10 colors are available in the last five of those sizes.

example i have:
if (product_option('Cover').selectedIndex == 1)
{ alert('You have chosen Hard cover for this product'); return true; }

how do you say:
if product_option'whatcolor' then show sizes 1-10
if product_option'othercolor' then hide sizes 5-10

can anyone help me with this?

01-28-2003, 11:35 PM
You need the if-else control structures:

and the section on logical operators too

and then it's done in an instant.