× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



After a lot of frustration and experimentation and with the help of a solid 
nudge in the correct direction (thanks B.C.) I now have a working solution.  To 
save anyone else the headaches I've suffered researching this, the bare bones 
code is posted below.
-----------------------------------------------------------------------------------
HTML entry screen:
(This is inside of a table with is in turn embedded in a form)

   <tr>
      <td><div align="left"><font color="white">*</font>Contact Type:</div></td>
      <td><div align="left">
/$ContTypList
          <INPUT TYPE=CHECKBOX
                 NAME="ContTypChkBox"
                 VALUE="/%vdContTypVal%/"
                 /%vdContTypChecked%/>/%vdContTypDsp%/<BR>
/$ContTypListX
      </td>
   </tr>  

-------------------------------------------------------------------------------------
RPG code that displays the above screen:

//This is inside the loop that creates multiple checkboxes:
 updHTMLvar('vdContTypVal':ValueField);
 updHTMLvar('vdContTypDsp':DisplayText);
 wrtsection('ContTypList');
-----------------------------------------
RPG code that traps users' entry:
 
     p GetChkBox       b
     d                 pi
      * Get checkbox entries: 
     d NumChecked      s             10i 0
     d Loop#           s             10i 0
      /Free
        NumChecked = ZhbGetVarCnt('ContTypChkBox'); 
        For Loop# = 1 To NumChecked;
          AField = %Trim(ZhbGetVar('ContTypChkBox':Loop#));
          DoSomethingWith(AField);
          //vdContTypChecked can be given the value of 'checked'
          // at this point if page is to be re-presented.
        EndFor;
      /End-Free
     p GetChkBox       E

-------------------------------------------------------------

Seems so simple once I look back on it, but man this was a pain!

Thanks to all who took the trouble to make suggestions on how to do this.
Don Freeman


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.