How can I code to get more than One value from checkbox?

From: Shufen (s4046441_at_student.uq.edu.au)
Date: 09/30/04


Date: 30 Sep 2004 12:03:05 -0700

Hi,

I'm a newbie that just started to learn python, html and etc. I have
some questions to ask and hope that someone can help me on.

I'm trying to code a python script (with HTML) to get values from a
html form that consists of about 10 checkbox and a textbox where user
have to key in a value to perform a search.

>From python tutors, I learned that I have to use the following method:

###
qtype = data.getfirst('qtype') ---- checkbox name
qtext = data.getfirst('qtext', '') ---- textbox name
###

but I don't really know how to do it. Should I use qtype =
data.getlist('qtype') to get the value from the checkbox and how to?

Currently, my method required me to type in every possible combination
of the checkbox and I know that this is wrong. I wanna to include
%(qtype) in my query statement so that the script will look for the
value that contain qtype everytime a form is processs but the way I'm
doing now is wrong.

query = "select %(qtype)s from shot_descriptions where
shot_number=%(qtext)s", qtype, qtext

Thus, can someone help me on this.

Thank you for any help.

Shufen



Relevant Pages

  • Re: How can I code to get more than One value from checkbox?
    ... > I'm a newbie that just started to learn python, html and etc. ... > html form that consists of about 10 checkbox and a textbox where user ... > %(qtype) in my query statement so that the script will look for the ...
    (comp.lang.python)
  • Re: multiple row updates in MYSQL using HTML
    ... > if the checkbox is checked incase you are updating most of the records ... >>all to another perl script to perform the update. ... >>I basically need maintenance of one table with unlimited rows containing ... HTML? ...
    (comp.lang.perl)
  • Plain text and html not getting along in net.mail.message
    ... text with html formatted text and set the isBodyHTML = true that I get ... I've a checkbox that if checked sets the IsBodyHTML=true. ... Dim MyMail As MailMessage = New MailMessage ... Dim SMTPMail As SmtpClient = New SmtpClient ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Problem with Javascript in a UserControl
    ... Make a look at the HTML generated by your code and find your checkbox ID. ... fine if I put the UserControl Data directly in my Web Page. ... I am used to seeing this from DataGrids, but not as a regular control on the page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Adding CssClass property default to custom checkbox wraps with span tag
    ... checkBox server control,correct? ... doesn't 100% identical to the html checkbox input element. ... element inside the ASP.NET checkbox server control, ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)