PDA

View Full Version : checkboxes with different names!!



reasr
03-07-2005, 01:38 PM
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

jbot
03-07-2005, 02:22 PM
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.