// First remove the control if it already exists on the form var RemCtrl = document.getElementById("control_id"); if (RemCtrl) { document.form.removeChild(RemCtrl); } var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "control_id"); NewCtrl.setAttribute("name", "wf_variable_name"); NewCtrl.setAttribute("elementname", "combobox1"); NewCtrl.setAttribute("elementtype", "combobox"); NewCtrl.setAttribute("sourcetype", "typeFex"); NewCtrl.setAttribute("operation", "NONE"); NewCtrl.setAttribute("datatype", "1"); NewCtrl.setAttribute("addalloption", "1"); NewCtrl.setAttribute("dynalldisplayvalue", "-- Select --"); NewCtrl.setAttribute("inchainindex", "-1"); NewCtrl.setAttribute("chainnumber", "-1"); NewCtrl.setAttribute("cacheruntimedata", "0"); NewCtrl.setAttribute("displayfield", ""); NewCtrl.setAttribute("datafield", ""); NewCtrl.setAttribute("numofrecords", "-1"); NewCtrl.setAttribute("datasource", "your_select_list.fex"); NewCtrl.setAttribute("datafieldtype", "CHAR"); NewCtrl.setAttribute("ibiformat", ""); NewCtrl.setAttribute("IBIAPP_app", "your_app_folder"); NewCtrl.setAttribute("IBIC_server", "EDASERVE"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; NewCtrl.style.height = 20; document.form.appendChild(NewCtrl); // Once your control has been added to your form you can call IBs routine to load it // from a fex or master according the the controls sourcetype attribute. populateDynamicCtrl(NewCtrl);
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 |
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 |
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 |
var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "wf_variable_name"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; // Don't use the height especially if you are using a multiple select NewCtrl.style.height = 20; document.body.appendChild(NewCtrl); populate(NewCtrl,'optrela')
<select id="edit11" name="wf_variable_name" style="position:absolute; top:110; left:515; width:145; height:20;"></select>This is because all the other attributes are used internally by IB's JavaScript and are not being used by your code?
// Add an event handler to the new control using a seperate function NewCtrl.attachEvent("onchange", createSelects); // This function adds an event handler to a control function createSelects() { // You can use this to identify the control to which you are adding the event this.displayElement = window.event.srcElement; // just put your onChange event here - parameterised of course!! your_function_name(parm1, parm2, .....); }
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 |
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 |
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 |
< !-- Generated by Report Layout Painter --> <HTML> <HEAD> <TITLE>HtmlPage </TITLE> <BASE href=HTTP://localhost:8080> <script id=clientEventHandlersJS type=text/javascript> function button1_OnClick(ctrl) { // TODO: add validation code here OnExecute(ctrl) } function populate(id, fileid) { var selobj = document.getElementById(id) ; var fidobj = document.getElementById(fileid) ; selobj.length = 0 ; for (var i=0; i<fidobj.length; i++) selobj.options[i] = new Option(fidobj[i].text,fidobj[i].value); } function report1_onfocus(ctrl) { } // function edit1_onchange(ctrl) { // document.getElementById('edit6').disabled=false; var selobj1 = document.getElementById('edit1'); var i = document.getElementById('edit1').selectedIndex; var reltype = selobj1[i].value.substring(0, 1); //alert("the value is" + reltype + " " + selobj1[i].value); if (reltype == "A") { populate('edit6','optrela') } else if (reltype == "D") { populate('edit6','optreld') } else { populate('edit6','optreln')}; } // function window_onload() { // document.getElementById('edit2').disabled=true; document.getElementById('edit3').disabled=true; document.getElementById('edit4').disabled=true; document.getElementById('edit5').disabled=true; document.getElementById('edit6').disabled=true; document.getElementById('edit7').disabled=true; document.getElementById('edit8').disabled=true; document.getElementById('edit9').disabled=true; document.getElementById('edit10').disabled=true; document.getElementById('edit11').disabled=true; document.getElementById('edit12').disabled=true; document.getElementById('edit13').disabled=true; document.getElementById('edit14').disabled=true; //document.getElementById('edit15').disabled=true; } // function edit6_onchange(ctrl) { var selobj1 = document.getElementById('edit1'); var i = document.getElementById('edit1').selectedIndex; var reltype = selobj1[i].value.substring(0, 1); //alert("the value is" + reltype + " " + selobj1[i].value); document.getElementById('edit11').disabled=false; if (reltype == "A") { DropAndChangeType('edit11') } else if (reltype == "D") { DropAndChangeDate('edit11') } ; } function DropAndChangeType (id) { var selobj = document.getElementById(id) ; var olpparm =selobj.getAttribute("name"); alert ("the parm is " + olpparm); var RemCtrl = document.getElementById(id); if (RemCtrl) { document.body.removeChild(RemCtrl); } var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "VAL1"); NewCtrl.setAttribute("elementname", "edit11"); NewCtrl.setAttribute("elementtype", "combobox"); NewCtrl.setAttribute("sourcetype", "typeFex"); NewCtrl.setAttribute("operation", "NONE"); NewCtrl.setAttribute("datatype", "1"); NewCtrl.setAttribute("addalloption", "1"); NewCtrl.setAttribute("dynalldisplayvalue", "-- Select --"); NewCtrl.setAttribute("inchainindex", "-1"); NewCtrl.setAttribute("chainnumber", "-1"); NewCtrl.setAttribute("cacheruntimedata", "0"); NewCtrl.setAttribute("displayfield", ""); NewCtrl.setAttribute("datafield", ""); NewCtrl.setAttribute("multiple",""); NewCtrl.setAttribute("numofrecords", "-1"); NewCtrl.setAttribute("datasource", "bob22.fex"); NewCtrl.setAttribute("datafieldtype", "CHAR"); NewCtrl.setAttribute("ibiformat", ""); NewCtrl.setAttribute("IBIAPP_app", "bob"); NewCtrl.setAttribute("IBIC_server", "EDASERVE"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; NewCtrl.style.height = 20; NewCtrl.attachEvent("onchange", displayValues); document.body.appendChild(NewCtrl); populateDynamicCtrl(NewCtrl); } function displayValues (ctrl) { var selobj1 = document.getElementById('edit11'); var i = document.getElementById('edit11').selectedIndex; alert("the value is" + " " + selobj1[i].value); alert("the text is" + " " + selobj1[i].text); } function DropAndChangeDate (id) { var selobj = document.getElementById(id) ; var olpparm =selobj.getAttribute("name"); alert ("the date parm is " + olpparm); var RemCtrl = document.getElementById(id); if (RemCtrl) { document.body.removeChild(RemCtrl); } var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "VAL1"); NewCtrl.setAttribute("elementname", "edit11"); NewCtrl.setAttribute("elementtype", "14"); NewCtrl.setAttribute("calendardata", "0/0/-10;0/0/10"); NewCtrl.setAttribute("calendardatatype","1"); NewCtrl.setAttribute("ibiformat","YMD"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; NewCtrl.style.height = 20; document.body.appendChild(NewCtrl); } function edit6_oldchange(ctrl) { var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "VAL1"); NewCtrl.setAttribute("readOnly","false"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; // Don't use the height especially if you are using a multiple select //NewCtrl.style.height = 20; document.body.appendChild(NewCtrl); populate(NewCtrl,'optrela') } </SCRIPT> <script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT> <META content="MSHTML 6.00.2900.2912" name=GENERATOR> </HEAD> <BODY style="OVERFLOW: auto"> <iframe language=javascript id=report1 style="Z-INDEX: 33; LEFT: 20px; WIDTH: 460px; POSITION: absolute; TOP: 290px; HEIGHT: 110px" onfocus=report1_onfocus(this) tabIndex=1 name=report1 align=top scrolling=no elementtype="2" autoExecute="False" requests_list="0" executebuttonId="button1"> </IFRAME> <SPAN id=text1 style="Z-INDEX: 2; LEFT: 60px; WIDTH: 64px; POSITION: absolute; TOP: 30px; HEIGHT: 16px" tabIndex=2>Field </SPAN> <SELECT language=java_script id=edit1 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 70px" tabIndex=3 onchange=edit1_onchange[this) size=1 name=FLD1 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text1" start="fileopen" readOnly="false" height="92947284" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> !IBI.FIL.BOB22; </SELECT> <SELECT id=edit2 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 100px" tabIndex=5 size=1 name=FLD2 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text2" start="fileopen" readOnly="false" height="93210308" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SELECT id=edit3 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 130px" tabIndex=7 size=1 name=FLD3 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text3" start="fileopen" readOnly="false" height="93328380" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SELECT id=edit4 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 160px" tabIndex=9 size=1 name=FLD4 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text4" start="fileopen" readOnly="false" height="93405052" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SELECT id=edit5 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 190px" tabIndex=11 size=1 name=FLD5 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text5" start="fileopen" readOnly="false" height="93200132" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SPAN id=text6 style="Z-INDEX: 12; LEFT: 200px; WIDTH: 65px; POSITION: absolute; TOP: 30px; HEIGHT: 16px" tabIndex=12>Comparison </SPAN> <SELECT language=java_script id=edit6 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 70px" tabIndex=13 onchange=edit6_onchange[this) size=1 name=REL1 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text6" start="fileopen" readOnly="false" height="59290532" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit7 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 100px" tabIndex=15 size=1 name=REL2 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text7" start="fileopen" readOnly="false" height="59290612" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit8 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 130px" tabIndex=17 size=1 name=REL3 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text8" start="fileopen" readOnly="false" height="93384500" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit9 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 160px" tabIndex=19 size=1 name=REL4 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text9" start="fileopen" readOnly="false" height="93384580" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit10 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 190px" tabIndex=21 size=1 name=REL5 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text10" start="fileopen" readOnly="false" height="93384660" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <INPUT id=edit11 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 70px" tabIndex=23 hspace=0 accept=0 indeterminate=-1 value=" " name=VAL1 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text11" multiple="false"> <SPAN id=text12 style="Z-INDEX: 24; LEFT: 340px; WIDTH: 62px; POSITION: absolute; TOP: 30px; HEIGHT: 16px" tabIndex=24>Value </SPAN> <INPUT id=edit12 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 100px" tabIndex=25 readOnly hspace=0 accept=0 indeterminate=-1 value=" " name=VAL2 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text12" multiple="false"> <INPUT id=edit13 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 130px" tabIndex=27 readOnly hspace=0 accept=0 indeterminate=-1 value=" " name=VAL3 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text13" multiple="false"> <INPUT id=edit14 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 160px" tabIndex=29 readOnly hspace=0 accept=0 indeterminate=-1 value=" " name=VAL4 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text14" multiple="false"> <INPUT id=edit15 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 190px" tabIndex=31 hspace=0 accept=0 indeterminate=-1 value=" " name=VAL5 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text15" multiple="false" ibiformat="YMD" calendardatatype="1" calendardata="0/0/-10;0/0/10"> < !-- Option list 1 hidden --> < !-- Option list 2 hidden --> < !-- Option list 2 hidden --> <INPUT language=java_script id=button1 style="Z-INDEX: 32; LEFT: 360px; WIDTH: 120px; POSITION: absolute; TOP: 230px; HEIGHT: 30px" onclick=button1_OnClick[this) tabIndex=32 type=button value="Run report1" name=button1 requests_list="0"> <SELECT id=optrela style="DISPLAY: none; LEFT: 85px; POSITION: absolute; TOP: 244px"> !IBI.FIL.SELRELA; </SELECT> <SELECT id=optreld style="DISPLAY: none; LEFT: 140px; POSITION: absolute; TOP: 240px"> !IBI.FIL.SELRELD; </SELECT> <SELECT id=optreln style="DISPLAY: none; LEFT: 190px; POSITION: absolute; TOP: 240px"> !IBI.FIL.SELRELN; </SELECT> <xml id=ibi_requests> <requests> <request requestid="0" targetname="report1" ibif_ex="report1" targettype="0" sourcetype="typeAdhocfex" ibiapp_app="" paramremovedbyuser="WFFMT"> < ![CDATA[-* File custom1.fex -SET &ECHO='ALL'; -DEFAULT &FLD1='FOC_NONE'; -DEFAULT &FLD2='FOC_NONE'; -DEFAULT &FLD3='FOC_NONE'; -DEFAULT &FLD4='FOC_NONE'; -DEFAULT &FLD5='FOC_NONE'; -DEFAULT &REL1=' '; -DEFAULT &REL2=' '; -DEFAULT &REL3=' '; -DEFAULT &REL4=' '; -DEFAULT &REL5=' '; -DEFAULT &VAL1=' '; -DEFAULT &VAL2=' '; -DEFAULT &VAL3=' '; -DEFAULT &VAL4=' '; -DEFAULT &VAL5=' '; -DEFAULT &WFFMT='PDF'; -*SET &FLD1 = 'ACCEPTANCEFEE' ; -*SET &REL1 = 'GE' ; -*SET &VAL1= 100 ; -SET &WHERE1= IF &FLD1 NE 'FOC_NONE' THEN 'WHERE ' | &FLD1 | ' ' | &REL1 | ' ' | &VAL1 | ';' ELSE ' '; -SET &WHERE2= IF &FLD2 NE 'FOC_NONE' THEN 'WHERE ' | &FLD2 | ' ' | &REL2 | ' ' | &VAL2 | ';' ELSE ' '; -SET &WHERE3= IF &FLD3 NE 'FOC_NONE' THEN 'WHERE ' | &FLD3 | ' ' | &REL3 | ' ' | &VAL3 | ';' ELSE ' '; -SET &WHERE4= IF &FLD4 NE 'FOC_NONE' THEN 'WHERE ' | &FLD4 | ' ' | &REL4 | ' ' | &VAL4 | ';' ELSE ' '; -SET &WHERE5= IF &FLD5 NE 'FOC_NONE' THEN 'WHERE ' | &FLD5 | ' ' | &REL5 | ' ' | &VAL5 | ';' ELSE ' '; TABLE FILE V_REPORT1 PRINT * &WHERE1 ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>,<Excel Formula,EXL2K FORMULA>).Select type of display output. ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', TOPMARGIN=0.055556, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, RIGHTGAP=0.055556, LEFTGAP=0.027778, LINES-PER-PAGE=20, TARGET=_blank,$ END]]> <variables> <variable field="FLD1" file="v_report1.mas" desc="FLD1" datatype="0" operation="" default="FOC_NONE" name="FLD1" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD2" file="v_report1.mas" desc="FLD2" datatype="0" operation="" default="FOC_NONE" name="FLD2" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD3" file="v_report1.mas" desc="FLD3" datatype="0" operation="" default="FOC_NONE" name="FLD3" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD4" file="v_report1.mas" desc="FLD4" datatype="0" operation="" default="FOC_NONE" name="FLD4" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD5" file="v_report1.mas" desc="FLD5" datatype="0" operation="" default="FOC_NONE" name="FLD5" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL1" file="v_report1.mas" desc="REL1" datatype="0" operation="" default=" " name="REL1" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL2" file="v_report1.mas" desc="REL2" datatype="0" operation="" default=" " name="REL2" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL3" file="v_report1.mas" desc="REL3" datatype="0" operation="" default=" " name="REL3" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL4" file="v_report1.mas" desc="REL4" datatype="0" operation="" default=" " name="REL4" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL5" file="v_report1.mas" desc="REL5" datatype="0" operation="" default=" " name="REL5" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL1" file="v_report1.mas" desc="VAL1" datatype="0" operation="" default=" " name="VAL1" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL2" file="v_report1.mas" desc="VAL2" datatype="0" operation="" default=" " name="VAL2" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL3" file="v_report1.mas" desc="VAL3" datatype="0" operation="" default=" " name="VAL3" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL4" file="v_report1.mas" desc="VAL4" datatype="0" operation="" default=" " name="VAL4" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL5" file="v_report1.mas" desc="VAL5" datatype="0" operation="" default=" " name="VAL5" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="WFFMT" file="v_report1.mas" desc="Select type of display output" datatype="0" operation="" default="PDF" name="WFFMT" accept="0" type="default" select="0" controltype="7"> <value value="HTML" display="HTML"/> <value value="PDF" display="PDF"/> <value value="EXL2K" display="Excel 2000"/> <value value="EXL2K FORMULA" display="Excel Formula"/> </variable> </variables> </request> </requests> </xml> </BODY> </HTML>This message has been edited. Last edited by: secret,
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 |
<!-- Generated by Report Layout Painter --> <HTML> <HEAD> <TITLE>HtmlPage </TITLE> <BASE href=HTTP://localhost:8080> <SCRIPT id=clientEventHandlersJS type=text/javascript> function button1_OnClick(ctrl) { // TODO: add validation code here OnExecute(ctrl) } function populate(id, fileid) { var selobj = document.getElementById(id) ; var fidobj = document.getElementById(fileid) ; selobj.length = 0 ; for (var i=0; i<fidobj.length; i++) selobj.options[i] = new Option(fidobj[i].text,fidobj[i].value); } function report1_onfocus(ctrl) { } // function edit1_onchange(ctrl) { // document.getElementById('edit6').disabled=false; var selobj1 = document.getElementById('edit1'); var i = document.getElementById('edit1').selectedIndex; var reltype = selobj1[i].value.substring(0, 1); //alert("the value is" + reltype + " " + selobj1[i].value); if (reltype == "A") { populate('edit6','optrela') } else if (reltype == "D") { populate('edit6','optreld') } else { populate('edit6','optreln')}; } // function window_onload() { // document.getElementById('edit2').disabled=true; document.getElementById('edit3').disabled=true; document.getElementById('edit4').disabled=true; document.getElementById('edit5').disabled=true; document.getElementById('edit6').disabled=true; document.getElementById('edit7').disabled=true; document.getElementById('edit8').disabled=true; document.getElementById('edit9').disabled=true; document.getElementById('edit10').disabled=true; document.getElementById('edit11').disabled=true; document.getElementById('edit12').disabled=true; document.getElementById('edit13').disabled=true; document.getElementById('edit14').disabled=true; //document.getElementById('edit15').disabled=true; } // function edit6_onchange(ctrl) { var selobj1 = document.getElementById('edit1'); var i = document.getElementById('edit1').selectedIndex; var reltype = selobj1[i].value.substring(0, 1); //alert("the value is" + reltype + " " + selobj1[i].value); document.getElementById('edit11').disabled=false; if (reltype == "A") { DropAndChangeType('edit11') } else if (reltype == "D") { DropAndChangeDate('edit11') } ; } function DropAndChangeType (id) { var selobj = document.getElementById(id) ; var olpparm =selobj.getAttribute("name"); alert ("the parm is " + olpparm); var RemCtrl = document.getElementById(id); if (RemCtrl) { document.body.removeChild(RemCtrl); } var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "VAL1"); NewCtrl.setAttribute("elementname", "edit11"); NewCtrl.setAttribute("elementtype", "combobox"); NewCtrl.setAttribute("sourcetype", "typeFex"); NewCtrl.setAttribute("operation", "NONE"); NewCtrl.setAttribute("datatype", "1"); NewCtrl.setAttribute("addalloption", "1"); NewCtrl.setAttribute("dynalldisplayvalue", "-- Select --"); NewCtrl.setAttribute("inchainindex", "-1"); NewCtrl.setAttribute("chainnumber", "-1"); NewCtrl.setAttribute("cacheruntimedata", "0"); NewCtrl.setAttribute("displayfield", ""); NewCtrl.setAttribute("datafield", ""); NewCtrl.setAttribute("multiple",""); NewCtrl.setAttribute("numofrecords", "-1"); NewCtrl.setAttribute("datasource", "bob22.fex"); NewCtrl.setAttribute("datafieldtype", "CHAR"); NewCtrl.setAttribute("ibiformat", ""); NewCtrl.setAttribute("IBIAPP_app", "bob"); NewCtrl.setAttribute("IBIC_server", "EDASERVE"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; NewCtrl.style.height = 20; NewCtrl.attachEvent("onchange", displayValues); document.body.appendChild(NewCtrl); populateDynamicCtrl(NewCtrl); } function displayValues (ctrl) { var selobj1 = document.getElementById('edit11'); var i = document.getElementById('edit11').selectedIndex; alert("the value is" + " " + selobj1[i].value); alert("the text is" + " " + selobj1[i].text); } function DropAndChangeDate (id) { var selobj = document.getElementById(id) ; var olpparm =selobj.getAttribute("name"); alert ("the date parm is " + olpparm); var RemCtrl = document.getElementById(id); if (RemCtrl) { document.body.removeChild(RemCtrl); } var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "VAL1"); NewCtrl.setAttribute("elementname", "edit11"); NewCtrl.setAttribute("elementtype", "14"); NewCtrl.setAttribute("calendardata", "0/0/-10;0/0/10"); NewCtrl.setAttribute("calendardatatype","1"); NewCtrl.setAttribute("ibiformat","YMD"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; NewCtrl.style.height = 20; document.body.appendChild(NewCtrl); } function edit6_oldchange(ctrl) { var NewCtrl = document.createElement("select"); NewCtrl.setAttribute("id", "edit11"); NewCtrl.setAttribute("name", "VAL1"); NewCtrl.setAttribute("readOnly","false"); NewCtrl.style.position='absolute'; NewCtrl.style.top = 110; NewCtrl.style.left = 515; NewCtrl.style.width = 145; // Don't use the height especially if you are using a multiple select //NewCtrl.style.height = 20; document.body.appendChild(NewCtrl); populate(NewCtrl,'optrela') } </SCRIPT> <SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT> <META content="MSHTML 6.00.2900.2912" name=GENERATOR> </HEAD> <BODY style="OVERFLOW: auto"> <IFRAME language=javascript id=report1 style="Z-INDEX: 33; LEFT: 20px; WIDTH: 460px; POSITION: absolute; TOP: 290px; HEIGHT: 110px" onfocus=report1_onfocus(this) tabIndex=1 name=report1 align=top scrolling=no elementtype="2" autoExecute="False" requests_list="0" executebuttonId="button1"> </IFRAME> <SPAN id=text1 style="Z-INDEX: 2; LEFT: 60px; WIDTH: 64px; POSITION: absolute; TOP: 30px; HEIGHT: 16px" tabIndex=2>Field </SPAN> <SELECT language=javascript id=edit1 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 70px" tabIndex=3 onchange=edit1_onchange(this) size=1 name=FLD1 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text1" start="fileopen" readOnly="false" height="92947284" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> !IBI.FIL.BOB22; </SELECT> <SELECT id=edit2 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 100px" tabIndex=5 size=1 name=FLD2 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text2" start="fileopen" readOnly="false" height="93210308" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SELECT id=edit3 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 130px" tabIndex=7 size=1 name=FLD3 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text3" start="fileopen" readOnly="false" height="93328380" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SELECT id=edit4 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 160px" tabIndex=9 size=1 name=FLD4 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text4" start="fileopen" readOnly="false" height="93405052" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SELECT id=edit5 style="LEFT: 20px; WIDTH: 130px; POSITION: absolute; TOP: 190px" tabIndex=11 size=1 name=FLD5 sourcetype="typeMaster" datafieldtype="INTIGER" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text5" start="fileopen" readOnly="false" height="93200132" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=FOC_NONE selected displaytext> </OPTION> </SELECT> <SPAN id=text6 style="Z-INDEX: 12; LEFT: 200px; WIDTH: 65px; POSITION: absolute; TOP: 30px; HEIGHT: 16px" tabIndex=12>Comparison </SPAN> <SELECT language=javascript id=edit6 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 70px" tabIndex=13 onchange=edit6_onchange(this) size=1 name=REL1 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text6" start="fileopen" readOnly="false" height="59290532" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit7 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 100px" tabIndex=15 size=1 name=REL2 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text7" start="fileopen" readOnly="false" height="59290612" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit8 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 130px" tabIndex=17 size=1 name=REL3 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text8" start="fileopen" readOnly="false" height="93384500" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit9 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 160px" tabIndex=19 size=1 name=REL4 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text9" start="fileopen" readOnly="false" height="93384580" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <SELECT id=edit10 style="LEFT: 180px; WIDTH: 130px; POSITION: absolute; TOP: 190px" tabIndex=21 size=1 name=REL5 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text10" start="fileopen" readOnly="false" height="93384660" hspace="0" maxLength="2147483647" loop="1" width="0" CHECKED="false" accept="0" indeterminate="false" vspace="0"> <OPTION value=" " selected displaytext> </OPTION> </SELECT> <INPUT id=edit11 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 70px" tabIndex=23 hspace=0 accept=0 indeterminate=-1 value=" " name=VAL1 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text11" multiple="false"> <SPAN id=text12 style="Z-INDEX: 24; LEFT: 340px; WIDTH: 62px; POSITION: absolute; TOP: 30px; HEIGHT: 16px" tabIndex=24>Value </SPAN> <INPUT id=edit12 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 100px" tabIndex=25 readOnly hspace=0 accept=0 indeterminate=-1 value=" " name=VAL2 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text12" multiple="false"> <INPUT id=edit13 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 130px" tabIndex=27 readOnly hspace=0 accept=0 indeterminate=-1 value=" " name=VAL3 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text13" multiple="false"> <INPUT id=edit14 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 160px" tabIndex=29 readOnly hspace=0 accept=0 indeterminate=-1 value=" " name=VAL4 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text14" multiple="false"> <INPUT id=edit15 style="LEFT: 340px; WIDTH: 100px; POSITION: absolute; TOP: 190px" tabIndex=31 hspace=0 accept=0 indeterminate=-1 value=" " name=VAL5 sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="96118856" operation addalloption="0" labelid="text15" multiple="false" ibiformat="YMD" calendardatatype="1" calendardata="0/0/-10;0/0/10"> <!-- Option list 1 hidden --> <!-- Option list 2 hidden --> <!-- Option list 2 hidden --> <INPUT language=javascript id=button1 style="Z-INDEX: 32; LEFT: 360px; WIDTH: 120px; POSITION: absolute; TOP: 230px; HEIGHT: 30px" onclick=button1_OnClick(this) tabIndex=32 type=button value="Run report1" name=button1 requests_list="0"> <SELECT id=optrela style="DISPLAY: none; LEFT: 85px; POSITION: absolute; TOP: 244px"> !IBI.FIL.SELRELA; </SELECT> <SELECT id=optreld style="DISPLAY: none; LEFT: 140px; POSITION: absolute; TOP: 240px"> !IBI.FIL.SELRELD; </SELECT> <SELECT id=optreln style="DISPLAY: none; LEFT: 190px; POSITION: absolute; TOP: 240px"> !IBI.FIL.SELRELN; </SELECT> <xml id=ibi_requests> <requests> <request requestid="0" targetname="report1" ibif_ex="report1" targettype="0" sourcetype="typeAdhocfex" ibiapp_app="" paramremovedbyuser="WFFMT"> <![CDATA[-* File custom1.fex -SET &ECHO='ALL'; -DEFAULT &FLD1='FOC_NONE'; -DEFAULT &FLD2='FOC_NONE'; -DEFAULT &FLD3='FOC_NONE'; -DEFAULT &FLD4='FOC_NONE'; -DEFAULT &FLD5='FOC_NONE'; -DEFAULT &REL1=' '; -DEFAULT &REL2=' '; -DEFAULT &REL3=' '; -DEFAULT &REL4=' '; -DEFAULT &REL5=' '; -DEFAULT &VAL1=' '; -DEFAULT &VAL2=' '; -DEFAULT &VAL3=' '; -DEFAULT &VAL4=' '; -DEFAULT &VAL5=' '; -DEFAULT &WFFMT='PDF'; -*SET &FLD1 = 'ACCEPTANCEFEE' ; -*SET &REL1 = 'GE' ; -*SET &VAL1= 100 ; -SET &WHERE1= IF &FLD1 NE 'FOC_NONE' THEN 'WHERE ' | &FLD1 | ' ' | &REL1 | ' ' | &VAL1 | ';' ELSE ' '; -SET &WHERE2= IF &FLD2 NE 'FOC_NONE' THEN 'WHERE ' | &FLD2 | ' ' | &REL2 | ' ' | &VAL2 | ';' ELSE ' '; -SET &WHERE3= IF &FLD3 NE 'FOC_NONE' THEN 'WHERE ' | &FLD3 | ' ' | &REL3 | ' ' | &VAL3 | ';' ELSE ' '; -SET &WHERE4= IF &FLD4 NE 'FOC_NONE' THEN 'WHERE ' | &FLD4 | ' ' | &REL4 | ' ' | &VAL4 | ';' ELSE ' '; -SET &WHERE5= IF &FLD5 NE 'FOC_NONE' THEN 'WHERE ' | &FLD5 | ' ' | &REL5 | ' ' | &VAL5 | ';' ELSE ' '; TABLE FILE V_REPORT1 PRINT * &WHERE1 ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>,<Excel Formula,EXL2K FORMULA>).Select type of display output. ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', TOPMARGIN=0.055556, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, RIGHTGAP=0.055556, LEFTGAP=0.027778, LINES-PER-PAGE=20, TARGET=_blank,$ END]]> <variables> <variable field="FLD1" file="v_report1.mas" desc="FLD1" datatype="0" operation="" default="FOC_NONE" name="FLD1" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD2" file="v_report1.mas" desc="FLD2" datatype="0" operation="" default="FOC_NONE" name="FLD2" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD3" file="v_report1.mas" desc="FLD3" datatype="0" operation="" default="FOC_NONE" name="FLD3" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD4" file="v_report1.mas" desc="FLD4" datatype="0" operation="" default="FOC_NONE" name="FLD4" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="FLD5" file="v_report1.mas" desc="FLD5" datatype="0" operation="" default="FOC_NONE" name="FLD5" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL1" file="v_report1.mas" desc="REL1" datatype="0" operation="" default=" " name="REL1" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL2" file="v_report1.mas" desc="REL2" datatype="0" operation="" default=" " name="REL2" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL3" file="v_report1.mas" desc="REL3" datatype="0" operation="" default=" " name="REL3" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL4" file="v_report1.mas" desc="REL4" datatype="0" operation="" default=" " name="REL4" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="REL5" file="v_report1.mas" desc="REL5" datatype="0" operation="" default=" " name="REL5" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL1" file="v_report1.mas" desc="VAL1" datatype="0" operation="" default=" " name="VAL1" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL2" file="v_report1.mas" desc="VAL2" datatype="0" operation="" default=" " name="VAL2" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL3" file="v_report1.mas" desc="VAL3" datatype="0" operation="" default=" " name="VAL3" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL4" file="v_report1.mas" desc="VAL4" datatype="0" operation="" default=" " name="VAL4" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="VAL5" file="v_report1.mas" desc="VAL5" datatype="0" operation="" default=" " name="VAL5" accept="0" type="default" select="0" controltype="7"> </variable> <variable field="WFFMT" file="v_report1.mas" desc="Select type of display output" datatype="0" operation="" default="PDF" name="WFFMT" accept="0" type="default" select="0" controltype="7"> <value value="HTML" display="HTML"/> <value value="PDF" display="PDF"/> <value value="EXL2K" display="Excel 2000"/> <value value="EXL2K FORMULA" display="Excel Formula"/> </variable> </variables> </request> </requests> </xml> </BODY> </HTML>
<html> <head> <title>Dynamic control example</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 id=ibigblloadCss type=text/javascript> ibigblloadCss(null); </SCRIPT> </head> <body style="background-color: rgb(240,245,255)" onload="OnLoad();"> <form method=get name="form" TARGET="_blank" onsubmit="generate_random();"> <INPUT type=hidden value="showvals" name="IBIF_ex"> <INPUT id=IBIAPP_app type=hidden value="anthony" name="IBIAPP_app"> <INPUT type=hidden value=0 name="IBIMR_random"> <SELECT ID="Column1" onChange=show_ctrl("Column1","Oper1"); STYLE="position:absolute; top:50px; left:50px;" name="Column1"> <OPTION value="FOC_NONE">--- Select --- <OPTION value="Column1">Column 1 <OPTION value="Column2">Column 2 <OPTION value="Column3">Column 3 <OPTION value="Column4">Column 4 </SELECT> <SELECT ID="Oper1" onChange=what_ctrl("Oper1"); STYLE="visibility:hidden; position:absolute; top:50px; left:150px; width:170px;" name="Oper1"> <OPTION value="FOC_NONE">--- Select --- <OPTION value="select-one">Single Select <OPTION value="select-multiple">Multi Select <OPTION value="text">Text Input <OPTION value="calendar">Calendar </SELECT> <SELECT ID="Column2" onChange=show_ctrl("Column2","Oper2"); STYLE="position:absolute; top:80px; left:50px;" name="Column2"> <OPTION value="FOC_NONE">--- Select --- <OPTION value="Column1">Column 1 <OPTION value="Column2">Column 2 <OPTION value="Column3">Column 3 <OPTION value="Column4">Column 4 </SELECT> <SELECT ID="Oper2" onChange=what_ctrl("Oper2"); STYLE="visibility:hidden; position:absolute; top:80px; left:150px; width:170px;" name="Oper2"> <OPTION value="FOC_NONE">--- Select --- <OPTION value="select-one">Single Select <OPTION value="select-multiple">Multi Select <OPTION value="text">Text Input <OPTION value="calendar">Calendar </SELECT> <SELECT ID="Column3" onChange=show_ctrl("Column3","Oper3"); STYLE="position:absolute; top:110px; left:50px;" name="Column3"> <OPTION value="FOC_NONE">--- Select --- <OPTION value="Column1">Column 1 <OPTION value="Column2">Column 2 <OPTION value="Column3">Column 3 <OPTION value="Column4">Column 4 </SELECT> <SELECT ID="Oper3" onChange=what_ctrl("Oper3"); STYLE="visibility:hidden; position:absolute; top:110px; left:150px; width:170px;" name="Oper3"> <OPTION value="FOC_NONE">--- Select --- <OPTION value="select-one">Single Select <OPTION value="select-multiple">Multi Select <OPTION value="text">Text Input <OPTION value="calendar">Calendar </SELECT> <INPUT style="POSITION: absolute; TOP: 480px; HEIGHT: 30px; LEFT: 180px; WIDTH: 80px;" type=submit value=Submit> </form> <script type=text/javascript> function show_ctrl(ctrl,next_ctrl) { this.ctrlElement = document.getElementById(ctrl); this.nextElement = document.getElementById(next_ctrl); if (this.ctrlElement.selectedIndex == 0) { this.nextElement.style.visibility = "hidden"; this.nextElement.selectedIndex = 0; } else { this.nextElement.style.visibility = "visible"; } } function what_ctrl(ctrl) { this.ctrlElement = document.getElementById(ctrl); var ctrlNum = ctrl.substring(4); var ctrlTop = this.ctrlElement.style.top; var RemCtrl = document.getElementById('Edit'+ctrlNum); remove_ctrl(RemCtrl); // A select control if (this.ctrlElement.selectedIndex==1 || this.ctrlElement.selectedIndex==2) { create_select(ctrlNum,ctrlTop); } else { // A text input control if (this.ctrlElement.selectedIndex==3) { create_text(ctrlNum,ctrlTop); } else { // A calendar control if (this.ctrlElement.selectedIndex==4) { create_calendar(ctrlNum,ctrlTop); } else { // The root option has been selected so just remove the control return; } } } } function create_select(ctrlNum,ctrlTop) { var NewCtrl = document.createElement("SELECT"); NewCtrl.setAttribute("id", "Edit"+ctrlNum); NewCtrl.setAttribute("name", "Edit"+ctrlNum); NewCtrl.setAttribute("elementname", "combobox"+ctrlNum); NewCtrl.setAttribute("elementtype", "combobox"); NewCtrl.setAttribute("sourcetype", "typeFex"); NewCtrl.setAttribute("operation", "NONE"); NewCtrl.setAttribute("datatype", "1"); NewCtrl.setAttribute("addalloption", "1"); NewCtrl.setAttribute("dynalldisplayvalue", "-- Select --"); NewCtrl.setAttribute("inchainindex", "-1"); NewCtrl.setAttribute("chainnumber", "-1"); NewCtrl.setAttribute("cacheruntimedata", "1"); NewCtrl.setAttribute("displayfield", ""); NewCtrl.setAttribute("datafield", ""); NewCtrl.setAttribute("numofrecords", "-1"); NewCtrl.setAttribute("datasource", "selctry1.fex"); NewCtrl.setAttribute("datafieldtype", "CHAR"); NewCtrl.setAttribute("ibiformat", ""); NewCtrl.setAttribute("IBIAPP_app", "anthony"); NewCtrl.setAttribute("IBIC_server", "EDASERVE"); NewCtrl.style.position="absolute"; NewCtrl.style.top = ctrlTop; NewCtrl.style.left = 325; NewCtrl.style.width = 250; document.form.appendChild(NewCtrl); if (this.ctrlElement.selectedIndex==2) { NewCtrl.multiple=true; NewCtrl.size=5; } populateDynamicCtrl(NewCtrl); } function create_text(ctrlNum,ctrlTop) { var NewCtrl = document.createElement("INPUT"); NewCtrl.setAttribute("id", "Edit"+ctrlNum); NewCtrl.setAttribute("name", "Edit"+ctrlNum); NewCtrl.setAttribute("type", "text"); NewCtrl.setAttribute("value","Nothing"); NewCtrl.style.position="absolute"; NewCtrl.style.top = ctrlTop; NewCtrl.style.left = 325; NewCtrl.style.width = 250; document.form.appendChild(NewCtrl); } function create_calendar(ctrlNum,ctrlTop) { var NewCtrl = document.createElement("INPUT"); NewCtrl.setAttribute("id", "Edit"+ctrlNum); NewCtrl.setAttribute("value","dd/mm/yy"); NewCtrl.setAttribute("name", "Edit"+ctrlNum); NewCtrl.setAttribute("elementname", "Edit"+ctrlNum); NewCtrl.setAttribute("elementtype", "editcalendar"); NewCtrl.setAttribute("labelid", ""); NewCtrl.setAttribute("caption", "editcalendar"); NewCtrl.setAttribute("operation", "NONE"); NewCtrl.setAttribute("ibiformat", "DMY"); NewCtrl.setAttribute("datasource", ""); NewCtrl.setAttribute("datafieldtype", "CHAR"); NewCtrl.setAttribute("calendardatatype", "0"); NewCtrl.setAttribute("calendardata", "01/01/1990;02/01/2015"); NewCtrl.style.position="absolute"; NewCtrl.style.top = ctrlTop; NewCtrl.style.left = 325; document.form.appendChild(NewCtrl); // setupCtrlCalendar(NewCtrl); } function remove_ctrl(ctrl) { if (ctrl) { document.form.removeChild(ctrl); } } // Nothing more than assigning a random number to an input to force a rerun of a report // as opposed to recalling it from browser cache . function generate_random() { var Random_No = Math.floor((Math.random()*100000)); Rand = document.getElementById("IBIMR_random"); Rand.value = Random_No; show_vars(); } // Show all variables that should be passed function show_vars() { var varlist = ""; for (i=0;i<document.all.length;i++) { if (document.all(i).name!="" && document.all(i).name!=undefined && document.all(i).value!=undefined) { varlist += document.all(i).name + " : " + document.all(i).value + "\r\n "; } } alert(varlist); } </script> <SCRIPT id=OnloadHandler> function OnLoad() { <!--startibilines--> UpdateData(); <!--endibilines--> } </SCRIPT> </body> <SCRIPT id=loadcalendar type=text/javascript> if(ibigblInitInfo.testOptions(dyncalendar)){ setDateRange(); setupDocCalendars(); } </SCRIPT> </html>
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 |
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 |
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 |