act*23235

subroutine act23235

*********************************************************************

* Test action item 23235

* Multiple selects should return multiple items

*********************************************************************

Include wbp w3Include

call w3HtmlInit("","")

call w3HtmlHeader("","")

call w3Printn("<H2>Procedure</H2>")

call w3Printn("<OL>")

call w3Printn("<LI>Select multiple entries from the following list")

call w3Printn("<LI>Specify the number selected")

call w3Printn("<LI>Submit the form")

call w3Printn("</OL><H2>Outcome</H2>")

call w3Printn("<P>The number select will be verified and the ")

call w3Printn("selected items shown to you.")

call w3Printn("<P>")

call w3HtmlFormBeg("","")

call w3Printn("<SELECT NAME=test MULTIPLE>")

for i = 1 to 10

    call w3Printn("<OPTION VALUE=":i:">":i:"</OPTION>")

next i

call w3Printn("</SELECT>")

call w3Printn("<BR><INPUT TYPE=TEXT NAME=NUMSELECTED>")

call w3Printn("<BR><INPUT TYPE=SUBMIT>")

call w3HtmlFormEnd

call w3HtmlFooter("","")

call w3Input(Err, 300, w3InputTrackPageNumberOff)

if Err = w3_OK then                     ; * verify no errors

   call w3HtmlInit("","")

   call w3HtmlHeader("","")

   call w3Printn("<H2>Results</H2>")

   selected = 0

   values   = ""

   call w3GetVal(selected, "NUMSELECTED")

   call w3GetVal(values, "]test")

   found = dcount(values, @vm)

   if selected = found then

      call w3Printn("<P>First part passes, number received matches your count.")

   end else

      call w3Printn("<P>First part fails, number received differs from your count.")

   end

   call w3Printn("<P>Here's what was received<UL>")

   for i = 1 to selected

       call w3Printn("<LI>":values<1,i>)

   next i

   call w3Printn("</UL>")

end

return