Newbie: creating an <li> list

flyguy flyguysyl at hotmail.com
Sat Apr 20 07:57:29 EDT 2002


Hy. I'd like to know how you can send a new html page with a group of
radio button. Here's my attempt:

  r1 is the value of a radio button that a user checks so that he can
be offered a format of response (in this case radio buttons) to a
question he composed while constructing a survey:

if not (form.has_key("question") and form.has_key("r1") and
form.has_key("r2")):
    MaPage=MaPage +  "<H1>Error</H1>"
    MaPage=MaPage + "<h3>Veuillez construire votre question et choisir
un format de reponse</h3>"
    

else:
 if (form.has_key("question") and form.has_key("r1") and
form.has_key("r2")):
        Q=form["question"].value
        MaPage=MaPage + "<center><h2>Voici votre question ainsi que
votre choix de reponse</h2></center>"
        MaPage=MaPage + "<br><br><table width=80%><tr><td><h2>" + Q +
"</h2></td></tr></table>"
        
        if(form["r1"].value==1):
             MaPage=MaPage + "<ol><li><input type=radio name=rep1
value=1>"
             MaPage=MaPage + "<li><input type=radio name=rep1
value=2>"
             MaPage=MaPage + "<li><input type=radio name=rep1
value=3>"
             MaPage=MaPage + "<li>input type=radio name=rep1
value=4></ol>"
             
MaPage=MaPage + "</body></HTML>"
print MaPage



More information about the Python-list mailing list