CGI multiple select?
John
nobody at nobody.com
Mon Apr 8 16:35:07 EDT 2002
Hi,
In my html form, I have 'multiple select'
<select name=spred multiple>
<option..>
<option..>
This form invokes CGI routine, where I try to read selected entries from
form["spred"]
My dilemma is here:
When only one entry is selected:
form["spred"].value (will be the object selected)
When multiple entries were selected:
for o in form["spred"]:
o.value (--> each of these will be the object selected)
Thus, I need to handle according to situation.. I though my previous
question on 'isList' can solve this matter, but somehow, all solution
suggested (isSequenceType, type, ..) cannot distinguish these two cases.
More information about the Python-list
mailing list