Radio buttons on forms
Paula Edmiston
paula at edmiston.org
Fri Sep 3 16:52:56 EDT 2004
Norwood, Randy:
> Actually, it is possible to have a set of radio
> buttons with none selected.
That's what I thought too. Here's my problem. I made several
surveys, incorporating a lot of radio buttons. I did not
code in "checked" for any. None. The surveys looked fine
in Moz and IE.
But I'm using a perl script that uses little templates. One
perl script for the engine, then 3 little files to
1) check for incomplete answers and prompt the user to return
and answer them.
2) format the data and save it to a file
3) take the user to a "thank you" page
Right away I tried it out in Lynx, a text-only browser used by screen
readers (I use lynx to try to make sure stuff is accessible) --
there will be a student in the class who is blind. The weird thing
was, in lynx, when I opened the surveys, the first option of
every question was checked. Automatically, by default. I did *not*
code any answer to be default checked.
Then I tried the surveys in moz and ie, leaving fields blank. My
perl script did "see" that I left empty the text and drop-down
pick list items *but* it did *not* report that radio buttons were
unanswered, though in a graphical browser all of the radios appear
unchecked. When I look at the file the data gets written to, these
fields are empty!
So could it be a browser problem? I'm really confused about this.
You can take a look at the surveys:
> I've done this type of validation in javascript, and PHP and
> Perl on the server side. Javascript is preferable, IMO.
> It's been a while since web developers have had to be concerned
> about users not having adequate Javascript support--especially
> for something like form validation.
I have a js to validate but I don't want to use it because I
need these surveys to be ada accessible. Also I tend to avoid js
when I can because while technology has surely brought the vast
majority of browsers up to speed, I keep hearing that many people
deliberately turn off js in their browsers.
You can see the survey at
http://gief.pair.com/edmiston/coral/weekly.shtm
See the data file that gets written to at
http://gief.pair.com/edmiston/coral/data-weekly.txt
and a copy of the script at
http://gief.pair.com/edmiston/coral/survey.txt
This is a sandbox, feel free to answer the survey and look at the data.
Thanks for your suggestions!
The main confusion for me is that in a
graphical browser the buttons appear unchecked. But the script
does not treat them as unchecked, that is, it doesn't call the
error text that tells the user questions are unanswered. but
when it writes to the data file it enters empty fields for
the unanswered questions.
best,
paula
----
Paula Edmiston
paula at edmiston.org
---------------------------------
Natives who beat drums to drive off evil spirits
are objects of scorn to smart Americans who blow
horns to break up traffic jams. - Kelly
More information about the Web4lib
mailing list