I have a form: bullets: product one product two product three product four check boxes: w/ option one w/ option two This creates 16 posibilities that go to 16 different links. How can I code this in PHP or javascript?
Thanks, SP. I still am having trouble finding the combination of using both radio buttons and check boxes. Any ideas?
I did it in javascript: <script> function navnav(){ var pl = {1:[30623,30629,30626,30632], 2:[30635,30641,30638,30644], 3:[30647,30653,30650,30656], 4:[30659,30665,30662,30668]}; var i = 0 ; jQuery('input[@type=checkbox]').each( function() { if( this.checked ) { i = i + parseInt(this.value); } } ); navnav_id = pl[jQuery('input[@name=prd1]:checked').val()][i]; var url = 'https://secure.thesite.com/orderpage.aspx?products='+navnav_id; window.open(url, '_self'); } </script> Code (markup): Here is the form: <form method="POST" name="orderForm" > <input type="radio" name="prd1" value="1" checked /> <input type="radio" name="prd1" value="2" /> <input type="radio" name="prd1" value="3" /> <input type="radio" name="prd1" value="4" /> <input type="checkbox" name="checkbox_item[]" value="1" checked /> <input type="checkbox" name="checkbox_item[]" value="2" checked /> <input type="image" onClick="navnav(); return false;" src="images/continue.gif" border="0" /> </form> Code (markup):