TABLE FILE SYSTABLE PRINT COMPUTE C1/A10 = 'FOC_NONE'; COMPUTE C2/A10 = '(All)'; NAME NOPRINT COMPUTE CTR/I5 = 0; WHERE RECORDLIMIT EQ 1 ON TABLE SET HOLDLIST PRINTONLY ON TABLE SET ASNAMES ON ON TABLE HOLD AS TOUT FORMAT ALPHA END -RUN FILEDEF TOUT CLEAR FILEDEF TOUT DISK tout.ftm (APPEND TABLE FILE CAR PRINT COUNTRY AS 'C2' COMPUTE CTR/I5 = LAST CTR + 1; BY COUNTRY AS 'C1' ON TABLE SET HOLDLIST PRINTONLY ON TABLE SET ASNAMES ON ON TABLE HOLD AS TOUT FORMAT ALPHA END -RUN TABLE FILE TOUT PRINT C2 BY CTR NOPRINT BY C1 ON TABLE SET HOLDLIST PRINTONLY ON TABLE PCHOLD FORMAT XML END -RUN
quote:Originally posted by jbond007:
dhagen,
I did something like this to append the file. This is exactly what I wanted. However, I'm still having problem with the other one I'm trying to do.
This one is a pop menu that will allow the user to select multiple values from a drop down list box. The value is then passed to the main form for processing.
The reason I'm trying to do it this way is to save real estate on the form. Currently, users have to scroll down make a selection on a field. We have numerous selections on the screen. Most of the are chained.
By having the item selected on a pop-up allow us to save space and makes it cleaner and looks way professional.
Any offer you can provide is greatly appreciated.
Thanks,
JD
<html> <head> <title>Countries</title> <SCRIPT id=IbiOptionsScript type=text/javascript> var cgipath = "cgipath"; var ibirls = "ibirls"; var multidrill = "multidrill"; var mntFormValidate = "mntFormValidate"; var dyncalendar = "dyncalendar"; var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,dyncalendar,multidrill); </SCRIPT> <SCRIPT id=nls src="/ibi_html/javaassist/nls.js" type=text/javascript> </SCRIPT> <SCRIPT id=ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript> </SCRIPT> <script language=javascript> function pass_value() { returnValue = ""; ctrlObj = document.getElementById("Country"); for (i=0;i<ctrlObj.length;i++) { if (ctrlObj(i).selected) { returnValue += "'"+ctrlObj(i).value+"',"; } } if (returnValue.length >= 1) { returnValue = returnValue.substring(0,returnValue.length-1); } self.close(); } </script> </head> <body style="background-color: #CFDCDF;" onload="OnLoad();"> <form id=form method=get> <input type=hidden id="Country" name="Country" value="~" /> <input type=hidden id="IBIAPP_app" name="IBIAPP_app" value="reports" /> <input type=hidden id="IBIC_server" name="IBIC_server" value="EDASERVE" /> <input type=hidden value=14:47:56 name ="IBIMR_random" /> <span style="position:absolute; top:5px; left:5px; width:150px; height:40px;">Country Selection</span> <select id="Country" style="position:absolute; top:35px; left:25px; width:175px;" name="Country" elementname="combobox1" elementtype="combobox" sourcetype="typeFex" labelid caption="combobox" operation="NONE" datatype="0" addalloption="-1" dynalldisplayvalue="-- Select --" inchainindex="-1" chainnumber="-1" cacheruntimedata="0" displayfield numofrecords="-1" datafield datasource="r1368ch1.fex" datafieldtype="CHAR" ibiformat IBIAPP_app="reports" IBIC_server="EDASERVE" multiple size="16"></select> <input type=button style="position:absolute; top:325px; left:25px;" id="sub_button" onclick="pass_value();" value="Return Value(s)" /> </form> <script language=javascript> function OnLoad() { opctrl = document.getElementById("Country"); var request = '/ibi_apps/WFServlet?IBIC_server=EDASERVE&IBIAPP_app=reports&IBIF_ex=yourfex&Rand='+Math.random(); if(request) { var xmlDoc = getXml(request); populateCtrlFromXmldoc(xmlDoc, opctrl); } else { alert("An error populating input control"); } document.getElementById('sub_button').focus(); } </script> </body> </html>and can be called within your parent page using the following JavaScript -
var url = "/ibi_html/Country_Prompt.htm?Rand="+Math.floor(Math.random()*100000); var Countries = showModalDialog(url,"","dialogWidth:200px; dialogHeight:340px; status:no; center:yes");
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | ||
WebFOCUS App Studio 8.2.06 standalone on Windows 10 |