two values for a checkbox
Hello, I was wanting to know the best way to have a checkbox give a duel value..
example say I have a check box called "comicbook" and I also have a checkbox called "single" and one called "pack"
What i would like is
if "single" is checked then value of comicbook is 5
if "pack" is checked then value of comicbook is 10
if both are checked then comicbook would pass both 5 and 10
any idea's?
thanks
Re: two values for a checkbox
It's just a simple 4 tier if...elseif...else statement.
Code:
var comicbook;
if (!single && !pack) {comicbook = 0;}
else if (single && !pack) {comicbook = 5;}
else if (!single && pack) {comicbook = 10;}
else {comicbook = 15;}