Python CGI Select Multiple Returning all items in box

L

larsmtl

Howdy all,

Is there an easy way to return all items of an "HTML select multiple"
even if they aren't highlighted?

form=cgi.FieldStorage()
form.getlist("box")

only returns those that are selected.

Thanks,

Mark
 
D

Dennis Lee Bieber

Howdy all,

Is there an easy way to return all items of an "HTML select multiple"
even if they aren't highlighted?

form=cgi.FieldStorage()
form.getlist("box")

only returns those that are selected.
Pardon, but if it did that, how would you know which had been
selected?

--
 
K

Kent Johnson

Sorry, I should have explained better. I'm using the "listbox" as a
repository. With some Javascript, the user dumps items into it and
then hits the submit. It's similar to what you see here:
http://www.mredkj.com/tutorials/tutorial_mixed2b.html

IIRC I have done this in the past with an onSubmit handler that went through and selected all the
items in the desired list so they would be included in the submit. It was long ago and far away
though...

Kent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top