|
Posted by J.O. Aho on 04/16/07 17:15
Me :) wrote:
>> You choice of subject is quite poor, it's better you write a subject that
>> describes what you are asking, not what you feel you are.
>
> Sorry.... point taken.
>
>
>>> The HARD part for me is the "conditional" processing for the [radio]
>>> button. It's driving me crazy.
>> <form action="apage.php">
>> <input type="radio" name="group1" value="Milk"> Milk<br>
>> <input type="radio" name="group1" value="Butter"> Butter<br>
>> <input type="Submit">
>> </form>
>>
>> switch($_REQUEST['group1']) {
>> case 'Milk':
>> echo "You like milk!<br>\n";
>> break;
>> case 'Butter':
>> echo "You like butter!!!<br>\n";
>> break;
>> default:
>> echo "You don't like anything<br>\n";
>> break; //not needed, but a good habbit
>> }
>
> Thanks for the guidance... but is there anyway to do this WITHOUT
> another "Submit" button? Such as when one of the 2 radio buttons
> is clicked, THEN move on.
>
> Excellent example above.... Thanks again.
If you want to do it without submit button, then you need to use javascript,
but this ain't a javascript newsgroup, I think comp.lang.javascript would be
far better group to ask that kind of question.
I prefer to use as little as possible of javascript, as nowadays more and more
users turn that off, which would make the form of yours to fail.
--
//Aho
Navigation:
[Reply to this message]
|