|
Post by meerkat on Mar 1, 2018 11:10:29 GMT -5
How do you get multiple selections from a drop down list. This program works find if you only select one item. However holding the control key or shift key to select multiple items gives an error...
dim c$(10) dim d$(10) for i = 1 to 10 c$(i) = str$(i) d$(i) = "show-->:";str$(i) next i
html "<SELECT id='et' name='et' multiple size=5>" for i = 1 to 10 html "<option value='";c$(i);"'>";d$(i);"</option>" next i html "</select>" print button #acd, "Search", [r] print wait [r] a$ = #request get$("et")
print "You Selected:";a$ wait
|
|
|
Post by StefanPendl on Mar 3, 2018 2:54:16 GMT -5
|
|
|
Post by meerkat on Mar 3, 2018 5:38:13 GMT -5
Thanks Stefan.. I found a way. And I think I actually like it better.
dim c$(20) dim d$(20) for i = 1 to 20 c$(i) = str$(i) d$(i) = "show-->:";str$(i) next i
html "<table><TR><TD>" html "<div style='width:220px; height: 200px; overflow: auto'>" '| div to make it scrolled for i = 1 to 20 html "<input type='checkbox' name='c_";str$(i);"' id='c_";str$(i);"' value='";c$(i);"' >";d$(i);"<BR>" next i html "</div>" html "</TD></TR></TABLE>"
button #acd, "Select", [r] print wait
[r] for i = 1 to 20 a$ = #request get$("c_";str$(i)) if a$ <> "" then print "You Selected:";a$ next i wait
|
|
jerry
Junior Member
Posts: 83
|
Post by jerry on Mar 28, 2020 19:14:20 GMT -5
Meerkat...
It's two years since your post and WOW it was really helpful!
Thanks a million!
Jerry
|
|