Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts

    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>

  • #2
    Regular Coder jdswebservice's Avatar
    Join Date
    Aug 2010
    Location
    Moon Township, PA
    Posts
    107
    Thanks
    0
    Thanked 5 Times in 5 Posts
    you're looking at a combination of jquery, css, html, and asp or php. your choice. if you're going down the php path maybe i can help but asp is not for me, sorry.

    J-

  • #3
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    or coldfusion would do the trick with a cfif statement.

  • #4
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    18
    Thanked 0 Times in 0 Posts
    what is a cfif statement.

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,332
    Thanks
    5
    Thanked 363 Times in 360 Posts
    cfif is a coldfusion tag. If you dont have coldfusion then it wouldnt matter...lol I was throwing out there that probably an if statement would work.

    if (one condition is true) do this

    else (do this)

    Im sure PHP has something similar, as well as most any other client and server side language. I am just familiar with coldfusion because its what I use.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •