delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

The column totals would be: 2, 0, 3 and the total would be 5. However if they then decide to choose:
radio33, radio36, radio38
The colum totals would change to: 2, 0, 1 and the total would be 3
I basically need the total of each column and the total overall. The value should be taken from the actual "VALUE". Hope this makes sense!


Hi,
I have a matrix of radio buttons:
<input type="radio" name="chcalt" id="radio33" value="1">
<input type="radio" name="chcalt" id="radio32" value="2">
<input type="radio" name="chcalt" id="radio31" value="3">
<input type="radio" name="chcaltas" id="radio36" value="1">
<input type="radio" name="chcaltas" id="radio35" value="2">
<input type="radio" name="chcaltas" id="radio34" value="3">
<input type="radio" name="chcaltrt" id="radio39" value="1">
<input type="radio" name="chcaltrt" id="radio38" value="2">
<input type="radio" name="chcaltrt" id="radio37" value="3">
These are in a table so first row of the above is in same column and so on. Let's say the following are chosen:
radio33, radio34, radio39
The column totals would be: 2, 0, 3 and the total would be 5. However if they then decide to choose:
radio33, radio36, radio38
The colum totals would change to: 2, 0, 1 and the total would be 3
I basically need the total of each column and the total overall. The value should be taken from the actual "VALUE". Hope this makes sense!

TOP

you haven't said what your problem is.

TOP

I did
  I basically need the total of each column and the total overall.
i.e. how do I go about it? I figured out how to do the total but not for each column.... which isn't essential but would be a nice feature to have

TOP

if you don't know anything about javascript i would suggest you take a look on this Javascript Tutorial

TOP

abstract:

The column totals would be: 2, 0, 3 and the total would be 5. However if they then decide to choose:
radio33, radio36, radio38
The colum totals would change to: 2, 0, 1 and the total would be 3
I basically need the total of each column and the total overall. The value should be taken from the actual "VALUE". Hope this makes sense!


Good job I know a little... then, but some help would be nice. I believe I know how to do it but it sure doesn't look very clean/optimised

TOP

i would say first step is to get the code working
here are some questions that may be a help to get you started:
When should the function be called to calculate
How do i access the values from the radio button
Where  should the results be displayed

TOP

I got code working but it uses a loop for each set and then case statements within
Ah, if it works, it works



The column totals would be: 2, 0, 3 and the total would be 5. However if they then decide to choose:
radio33, radio36, radio38
The colum totals would change to: 2, 0, 1 and the total would be 3
I basically need the total of each column and the total overall. The value should be taken from the actual "VALUE". Hope this makes sense!

TOP

Back Forum