OK, here's the problem. I remember I once had some bits of code allowing to process data from HTML forms through Java scripts and display results. However, I lost them and I don't remember how I made that. I've been trying, but it either displays nothing or just 'undefined' when I try to access it.
Basically, there's that
<Input type="radio" name="q1" value="a">option1
<Input type="radio" name="q1" value="b">option2
then it goes like
<Input type="radio" name="q2" value="a">option1
<Input type="radio" name="q2" value="b">option2
At the end of the form is a submit button that refers to the GiveResults() function, and the said function is, in its test shape:
function giveresults()
{
zzz=document.testform.q1.value;
document.write(zzz);
}
And then I get the undefined, no matter what.
What am I supposed to do? I can't pass answers from 101 questions as one argument string for a function.
I need to make [if] function for each selectable option since it's a test. In fact, I could even choose something in the shape of:
If document.form.option.selected
{variable1++;
variable2--;
variable3++;
variable4--;}
And then everything selectable would have its own name, rather than one name for a group of options each inflicting a different value adjustment when selected.
But how does one frame it properly in Java Script? Or maybe you know a better way to deal with the wretched form?
It has to be in JavaScript because nothing else is supported by my host. No CGI, no PHP etc, just JavaScript or VB - and I'd rather avoid VB.
Special: I need it to update each time someone changes an object's value and it can't perform ++ and -- on my variable again each time someone changes his mind back and forth.
The only way I see now is for each option to have an onclick function setting a 0/1 variable and then after clicking the submit button, it would have to go by an if function for each 1. That's doable but quite absurd.
Any suggestions? Thanks very much in advance for any help.