× 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.



Why not make the /%WF_Sites%/ a section by itself.  It makes the html a
little confusing but may the select <select size="1" name="WF_SiteID"> a
section the /%WF_Sites%/ a section and the </select> a section.  

This way you can write out the /%WF_Sites%/ as many times as you want?


message: 4
date: Thu, 28 Oct 2004 09:57:18 -0700
from: Tony Carolla <carolla@xxxxxxxxx>
subject: Using CGIDEV2 - UpdHTMLVar proc

I am trying to populate a <select> list with <option> values.  Within
the HTML template, I have the following:

<select size="1" name="WF_SiteID">
     /%WF_Sites%/
</select>

Inside the pgm, I set up a VARYING variable, and I am populating it
with each selection item using a DS:

D OptLn           DS                  Qualified
D  Chunk1                       15A   Inz('<option value="')
D  Site                          3A   Inz(*Blanks)
D  Chunk2                        2A   Inz('">')
D  SiteS                         3A   Inz(*Blanks)
D  Chunk4                        9A   Inz('</option>')

Each record in the file populates the two site fields in the DS, and
the DS gets added to the VARYING variable.

I then use UpdHTMLVar with the VARYING variable:

CallP updHTMLvar('WF_SITES':SelectOpts:InitHTMLVars);

The problem is that apparently, there is a max of 999 on a variable
length that gets sent to the web server.  The statement that replaces
the /%WF_Sites%/ variable always gets cut at 999.

Other solutions I have thought of:
  -Create 100 or so separate variables in the template, and within
the RPG, use a horrendously large select op to pin each successive
record into one of the templates (yukkk)
  -Use some other CGIDEV2 proc.

Has anybody else run into this?




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.