html tags and python

Tim Roberts timr at probo.com
Sat Mar 26 10:12:10 CET 2005


"Hansan" <none> wrote:
>
>Hi all
>
>I am making something for my webpage
>
>Where the user can choose a month: I have made that with a dropdown box.
>
> <select>
>        <option name = "1" value="1">January
>        <option name = "2" value="2">February
>        <option name = "3" value="3">March
>        <option name = "4" value="4">April
>        <option name = "5" value="5">May
>        <option name = "6" value="6">June
>        <option name = "7" value="7">July
>        <option name = "8" value="8">August
>        <option name = "9" value="9">September
>        <option name = "10" value="10">October
>        <option name = "11" value="11">November
>        <option name = "12" value="12">December
>        </select>
>
>The thing is:
>I also want the user to choose a date
>I will make this with another dropdownbox.
>But if the first month is selected, then there should be 31 days in the days
>dropdownbox, if the second month is selected there should be 28 days in the
>dropdownbow.

What if the year is 2004?  Then I assume you want 29 days in the listbox.
And that, of course, means they have to choose the year first.

This can be done, but it's a lot of trouble.  You might consider allowing 1
to 31 and validating the numbers in your "onSubmit" handler.

Or, even better, skip the listbox and just let me type the damn numbers
myself.  I hate being forced to fall back to my mouse to type in a date,
when I can type "3 tab 25 tab 2005" much quicker.  To do that with your
code, I have to type "m tab 2 2 2 2 2 2 tab 2005".

As an alternative, there are Javascript-based mini-calendars you can
download that popup a little window with the current month, and let you
click on the date.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list