Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     multidselect listbox
Go
New
Search
Notify
Tools
Reply
  
multidselect listbox
 Login/Join
 
Platinum Member
posted
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
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Reply With QuoteReport This Post
<matty@time>
posted
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
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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!
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     multidselect listbox

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.