howardfan123
08-23-2010, 01:04 AM
can anyone give me some direction on how to disable and enable a table based on there radio button choice.
i have a html form that has all the basics for a product.
the user can get it sent to them or someone else by the choice of radio buttons 1 or 2
after that they can add onto the product before adding it to the cart by passing the info too a asp page and then another asp page.
if they choose not to add on they can go straight to the cart from the first page but i don't want the info labels to pass to the cart if they choose to get it send to them (radio button 1)
radio button 2 opens up(toggles a div) a table to collect the mailing address if it is a gift to someone else. in order for the cart to label the mailing address right i need to use hidden fields for every text box.
back to my issue how do i get the whole table or div (named shipinfo) to disable to it does not post to the cart.
here is what i have so far
<span class="style30" style="text-align:center">Send directly to recipant:</span><input name="product3[]" type="radio" value="{br}{b}SEND CERT DIRECTLY TO RECIPANT---{/b}" onclick="toggle(this, 'shipGroup');"/>
<br/>
<center>
<span class="style30">Send to me to give to the recipant:</span>
<input name="product3[]" type="radio" value="{br}{b}SEND CERT TO ME TO GIVE TO RECIPANT---{/b}" /></center>
<input type="hidden" name="price3" value=".00" />
<input type="hidden" name="qty3" value="1" />
<input type="hidden" name="noqty3" value="3" />
<div id="shipGroup"><table width="616">
<tr>
<td width="125" style="text-align:left">
<span class="style30">First Name</span>
<input type="hidden" name="product3[]1" value="{br}FIRST NAME:" /></td>
<td width="151"><input type="text" name="product3[]2" value=""/></td>
<td width="147" style="text-align:right"><span class="style30" >Last Name</span>
<input type="hidden" name="product3[]3" value="{br}LAST NAME:" /></td>
<td width="173" style="text-align:left"><input type="text" name="product3[]4" value=""/></td></tr>
<tr><td colspan="3" style="text-align:left"><span class="style30">Address</span>
<input type="hidden" name="product3[]5" value="{br}ADDRESS:" />
<input type="text" name="product3[]6" value="" size="30"/></td>
<td> </td>
</tr>
<tr><td colspan="2" style="text-align:left"><span class="style30">City</span>
<input type="hidden" name="product3[]7" value="{br}CITY:" /><input type="text" name="product3[]8" value=""/></td>
<td><span class="style30">State</span>
<input type="hidden" name="product3[]9" value="{br}STATE:" />
<input type="text" name="product3[]10" value="" size="10"/></td>
<td><span class="style30">Zip code</span>
<input type="hidden" name="product3[]11" value="{br}ZIP CODE:" />
<input type="text" name="product3[]12" value="" size="5"/></td></tr></table>
</div>
i have a html form that has all the basics for a product.
the user can get it sent to them or someone else by the choice of radio buttons 1 or 2
after that they can add onto the product before adding it to the cart by passing the info too a asp page and then another asp page.
if they choose not to add on they can go straight to the cart from the first page but i don't want the info labels to pass to the cart if they choose to get it send to them (radio button 1)
radio button 2 opens up(toggles a div) a table to collect the mailing address if it is a gift to someone else. in order for the cart to label the mailing address right i need to use hidden fields for every text box.
back to my issue how do i get the whole table or div (named shipinfo) to disable to it does not post to the cart.
here is what i have so far
<span class="style30" style="text-align:center">Send directly to recipant:</span><input name="product3[]" type="radio" value="{br}{b}SEND CERT DIRECTLY TO RECIPANT---{/b}" onclick="toggle(this, 'shipGroup');"/>
<br/>
<center>
<span class="style30">Send to me to give to the recipant:</span>
<input name="product3[]" type="radio" value="{br}{b}SEND CERT TO ME TO GIVE TO RECIPANT---{/b}" /></center>
<input type="hidden" name="price3" value=".00" />
<input type="hidden" name="qty3" value="1" />
<input type="hidden" name="noqty3" value="3" />
<div id="shipGroup"><table width="616">
<tr>
<td width="125" style="text-align:left">
<span class="style30">First Name</span>
<input type="hidden" name="product3[]1" value="{br}FIRST NAME:" /></td>
<td width="151"><input type="text" name="product3[]2" value=""/></td>
<td width="147" style="text-align:right"><span class="style30" >Last Name</span>
<input type="hidden" name="product3[]3" value="{br}LAST NAME:" /></td>
<td width="173" style="text-align:left"><input type="text" name="product3[]4" value=""/></td></tr>
<tr><td colspan="3" style="text-align:left"><span class="style30">Address</span>
<input type="hidden" name="product3[]5" value="{br}ADDRESS:" />
<input type="text" name="product3[]6" value="" size="30"/></td>
<td> </td>
</tr>
<tr><td colspan="2" style="text-align:left"><span class="style30">City</span>
<input type="hidden" name="product3[]7" value="{br}CITY:" /><input type="text" name="product3[]8" value=""/></td>
<td><span class="style30">State</span>
<input type="hidden" name="product3[]9" value="{br}STATE:" />
<input type="text" name="product3[]10" value="" size="10"/></td>
<td><span class="style30">Zip code</span>
<input type="hidden" name="product3[]11" value="{br}ZIP CODE:" />
<input type="text" name="product3[]12" value="" size="5"/></td></tr></table>
</div>