Oops I should have said Austin not John below. Austin, could you or someone
point my in the direction of how to do this in PHP?
Thanks so much.
HiFi Tubes
On 1/17/06, HiFi Tubes <[EMAIL PROTECTED]> wrote:
>
> Thanks to all of you who responded. Yes, I am doing the grid --basically
> 100 radio buttons, that is ten comments that must be ranked from 1 to 10.
>
> Thanks so much Tedd for the JavaScript. I will keep that snippet for use
> and study to improve my JS skills.
>
> Unfortunately I should have said that I need to stay away from JS in case
> the users have shut that down in their browsers. I know I can detect that
> and have them turn it on but I'm dealing with folks who are not technically
> adept and the survey is long. Given the length of the survey (over 100
> questions) any additional hurdles will further lower the rate of return. So
> I really think I need to do this in PHP though I am open to suggestions
> here.
>
> John, you said this could easily be done by returning to the page -- that
> is what I am doing for the validation of the other questions on this page of
> the survey. My question, then, is how do I validate this grid of radio
> buttons in php without using Javascript and remember, too, that the user
> only has to answer one question so I have to deal with possible numerous
> null or no responses within the grid of radio buttons. They might rank
> only one color and that would be okay or they might rank any number between
> 1 and 10.
>
> (Additional note -- I am already carrying their responses over when they
> submit the page so that any radio buttons selected are still selected when
> the page shows up again after submitting.)
>
> Again, thanks so much for the help so far but I'd like to keep this in php
> if I could.
>
> HiFi Tubes
>
> On 1/17/06, tedd <[EMAIL PROTECTED]> wrote:
> >
> > >On Tue, 17 Jan 2006 10:45:01 -0500
> > >John Nichel < [EMAIL PROTECTED] > wrote:
> > >>
> > >> Huh? Maybe I'm just not awake this morning and not understanding
> > >> what you're trying to explain, but if you're using *radio* buttons,
> > >> only *one* of the same name can be checked at any give time. ie:
> > >>
> > >> <input type="radio" name="color" value="1" /> Blue
> > >> <input type="radio" name="color" value="2" /> Red
> > >> <input type="radio" name="color" value="3" /> Black
> > >> <input type="radio" name="color" value="4" /> Green
> > >> <input type="radio" name="color" value="5" /> Mauve
> > >>
> > >> If you click "Red" and "Blue" is already selected, "Blue" will
> > >> automatically be unselected. It's basic HTML.
> > >
> > >That's not what he's trying to do. Grab some coffee #;-D
> >
> >
> > Thanks Ozz -- I was not in the mood to be wrong (again -- too much
> > lately).
> >
> > When I was confronted with a similar problem before, I used html/php/js:
> >
> > <input type="radio" name="alter" onClick="return uncheckall(<?php
> > echo($what_button); ?>)">
> >
> > Where the javascript was:
> >
> > <script language="javascript">
> >
> > function uncheckall(num)
> > {
> > var els=document.forms[0].elements;
> > for ( i=els.length; i--; )
> > {
> > if( els[i].type.toLowerCase() == 'radio' )
> > {
> > if (i != num)
> > {
> > els[i].checked = false;
> > }
> > }
> > }
> > els[num].checked = true;
> > document.alter; return false;
> > }
> > </script>
> >
> > That way, when the user clicks any rank, all of the buttons within
> > that rank are unchcecked leaving only the most current checked.
> >
> > tedd
> >
> > --
> > --------------------------------------------------------------------------------
> >
> > http://sperling.com/
> >
> > --
> > PHP General Mailing List ( http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>