Anybody did this. I searched in forum but found most of the posts related to chaining.
Any help in this issue would be appreciated.
WFConsultant
WF 8105M on Win7/Tomcat
July 08, 2013, 09:45 AM
JL
I have used the following method to populate a changing dropdown list into a HTML page created via HTML Composer.
Create an iframe - iframe1
Create a javascript function:
function populateDDList() {
var randomNum=Math.random();
window.iframe1.location.href='/ibi_apps/WFServlet?IBIF_ex=lookup_DD.fex&random='+randomNum;
}
Note: In this example, the fex is not in the MRE. Just adjust the href to point to MRE domain, if the fex is in MRE.
The focexe (lookup_DD.fex) that generates the options
-* Prepare the dropdown list
DEFINE FILE xxxxxx
CNT/I11=LAST CNT + 1;
CNT_ALPHA/A11=TRIM('L', EDIT(CNT), 11, '0', 1, 'A11');
OPTIONS/A300='DDList.options['||CNT_ALPHA||'] = new Option('''||fieldname||''','''||fieldname||''');';
END
TABLE FILE xxxxxx
PRINT
OPTIONS
BY fieldname NOPRINT
ON TABLE HOLD AS HLD_DD_OPT FORMAT ALPHA
END
-RUN
-* Display the list of route names
-HTMLFORM BEGIN
<SELECT style="POSITION: absolute; TOP: 0px; LEFT: 0px; WIDTH: 220px;" id="cb_dropdown" name="cb_dropdown"></SELECT>
<script type=text/javascript>
function refreshOptions() {
var ddList=document.getElementById("cb_dropdown");
for(var i=ddList.options.length-1; i>=0; i--)
{
ddList.remove(i);
}
ddList.options.length = 0;
!IBI.FIL.HLD_DD_OPT;
}
refreshOptions();
</SCRIPT>
-HTMLFORM END