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 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    checkboxes with different names!!

    Hi,

    i have a form with six checkboxes , each checkbox has a name and a value, as follows:

    name="shoes" value=100
    name="glasses" value=530
    name="spone" value=150
    name="tshirt" value=40
    name="jeans" value=80

    name="bag" value=100

    and there is a textbox to show a total

    now i need a script to let only one checkbox among the five checkboxes to be selected , the total will calculate price of the "bag" + any of the five checkboxes.


    please help

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by reasr
    now i need a script to let only one checkbox among the five checkboxes to be selected , the total will calculate price of the "bag" + any of the five checkboxes.
    change the checkboxes to radio buttons and give them the same name, that way only one can be selected at the same time.
    *keep it simple (TM)


  •  

    Posting Permissions

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