Adding multiple checkbox values

I

ID10Terror

Hi:

I was wondering if it is possible to add the value of checkboxes.

<INPUT type=checkbox name=test01 CHECKED value=1>
<INPUT type=checkbox name=test01 CHECKED value=2>
<INPUT type=checkbox name=test01 CHECKED value=4>
<INPUT type=checkbox name=test01 CHECKED value=8>

If the user clicked the second (value=2) and third (value=4) check boxes,
when the submit button is clicked, the sum of all "test01" boxes is sent.
In this example, test01=6 would be sent. Is this possible or do I have to
use javascript or something else. I need to avoid the test01=2, 4 I am
currently getting.

Any and all help would greatly be appreciated.


Thanks
 
K

Kevin Spencer

In this example, test01=6 would be sent. Is this possible or do I have to
use javascript or something else.

It is possible AND you have to use javascript or something else.

Basically, what you need is a custom server-side form handler. If you can
program with ASP, PHP, or some other server-side technology, you can
certainly write one.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top