[Tutor] cgi module and checkboxes.

Kirk Bailey idiot1@netzero.net
Wed Dec 11 01:59:01 2002


ok, this is at least partly a html question.

Thomi Richards wrote:
> Hey,
> 
> what happens if you have a check box (say called "uid"), and you submit
> it to a CGI, and get the results of the form using the cgi module? I'm
> trying this, and for some reason, i cannot get it to work. I'm guessing
> that the result would be a dictionary, with "uid" as the key, and a list
> of all the check boxes which were ticked as the value? (or maybe a
> tuple?)
Check boxes have different names. RADIO BUTTONS have different values, same 
name. Unchecked checkboxes do not return a value. with 2+ radio buttons, a 
name returns with a value, but which one is depressed determines WHICH value.
so for checking ticked boxes, look for keys with 'haskey'. if the box is 
checked, the key is present, if not checked, not present. SEVERAL checkboxes 
can be there, all with the same value, but different names.

Am I clarifying, or confusing?



> 
> I flicked through the documentation, but didn't see anything very useful
> there, just something about files....
> 


-- 

end

Respectfully,
              Kirk D Bailey


+---------------------"Thou Art Free." -Eris-----------------------+
| http://www.howlermonkey.net  mailto:highprimate@howlermonkey.net |
| KILL spam dead!      http://www.scambusters.org/stopspam/#Pledge |
| http://www.tinylist.org  +--------+   mailto:grumpy@tinylist.org |
+------------------Thinking| NORMAL |Thinking----------------------+
                            +--------+

---------------------------------------------
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.com