/    Sign up×
Community /Pin to ProfileBookmark

disable/enable table

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

[CODE]<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>&nbsp;</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>[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @howardfan123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...