Focal Point
multidselect listbox

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3561087331

June 23, 2004, 04:21 PM
Lloyd
multidselect listbox
Hi, Does anyone have any sample code to take a multiselect listbox and pass the selected values to wfservlet?
PS. I am HTML pages with javascript...
thanks, Lloyd
June 23, 2004, 07:23 PM
<matty@time>
Hi Lloyd,

I believe the servlet call works the same way as the CGI call, so here is what the code looks like, if you've used HTML FORMS you know how to do it. You can also have JavaScript do the submit.

Here is some listbox code (dynamically created with WebFOCUS):

[td colspan=1 bgcolor="#ffffff" align=center>
[SELECT SIZE="10" NAME=MAGS CLASS=select MULTIPLE>
[OPTION VALUE="206" >AARP-THE MAGAZINE
[OPTION VALUE="M34" >ABA JOURNAL-THE LAWYERS
[OPTION VALUE="DB3" >ALLURE

Here is the form with the CGI (or Servlet) call:
[form name="form1" action="/cgi-bin/ibi_cgi/ibiweb.exe"
method="get" target="repwin">
[input type="hidden" name="IBIF_ex" value="magshare">
[input type="hidden" name="MAXMTH" value= 05 >
[input type="hidden" name="CURRYEAR" value= 2004 >

What WebFOCUS will do on the backend is breakout the multiselect for you like this:

Say I made all three picks above

&MAGS0 = 3 (this is a counter you can use for loops)
&MAGS = 206
&MAGS1 = 206
&MAGS2 = M34
&MAGS3 = DB3

You will want to swap my CGI call in the action of FORM1 with your own Servlet call.

Hope this helps,
Matthew
CMI@TimeInc
Matthew_Rossi@TimeInc.com
June 24, 2004, 05:20 PM
Lloyd
Hi, matty@time
Thanks, that worked out great...it was so simple. I was originally working on jscript to do it but was going down the wrong track.....I added your code to some code I found on the looping and it all came together!