Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Value of One Control Dynamically Impacting Another in HTML Composer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Value of One Control Dynamically Impacting Another in HTML Composer
 Login/Join
 
Gold member
posted
I am developing an HTML launch page using the HTML Composer in Dev Studio. I have one control, which is a radio button with 5 static values. I also have a list box control that I would like to dynamically load values via a fex based on a value selected with the radio button.

My radio button control has values like Region, Division, etc. If the selected value is Region, I'd like to have List Box populated with regions. If the selected value is District, I'd like to have the list box populated with districts. These values come from an Oracle table and I want to retrieve the values via a fex based on the radio button value.

Is this possible to do in the HTML Composer, or do I have to do this in HTML? How can I go about doing this?

Thanks!

This message has been edited. Last edited by: JRLewis,


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Virtuoso
posted Hide Post
You'll probably have to write your own javascript that you can tie to the radio button control. As an alternative you could create all 5 list boxes and populate all of them, and then use javascript to hide or unhide based on the radio button selection. then there is no delay when switching between values (after the initial load, or course)

Because you're populating different fields into the same list box control, you're also going to have to pass a variable that would tell your fex which parameter is being populated (region, division, etc.) because your fex will need to know which fields to use for display and/or comparision. If you create the list boxes separately, each has its own parameter name and would avoid confusion.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
We introduced some nifty new dynamic abilities in 769. Suggest you download 7.6.10 devstudio and have a look (when you are ready to deploy, your WF shoukld also be up to 7.6.10 too).


Brian Suter
VP WebFOCUS Product Development
 
Posts: 200 | Location: NYC | Registered: January 02, 2007Report This Post
Gold member
posted Hide Post
I've had luck in the past using a Dropdown list instead of Radio Buttons. you need to define the fieldand enter the values you need to display.

This code puts together office and worker:
SET HOLDLIST=PRINTONLY

JOIN
TCAS_OFC_WRKR_DMSN.TCAS_OFC_WRKR_DMSN.CAS_WRKR_DMSN_ID IN TCAS_OFC_WRKR_DMSN
TO MULTIPLE TCAS_WRKR_DMSN.TCAS_WRKR_DMSN.CAS_WRKR_DMSN_ID IN TCAS_WRKR_DMSN AS J0
END
JOIN
TCAS_OFC_WRKR_DMSN.TCAS_OFC_WRKR_DMSN.CAS_OFC_DMSN_ID IN TCAS_OFC_WRKR_DMSN
TO MULTIPLE TCAS_OFC_DMSN.TCAS_OFC_DMSN.CAS_OFC_DMSN_ID IN TCAS_OFC_DMSN AS J1
END
DEFINE FILE TCAS_OFC_WRKR_DMSN
WRKR_ID/A40=CAS_WRKR_DSPL_NM ||' - ' || CAS_WRKR_USR_ID;
END
TABLE FILE TCAS_OFC_WRKR_DMSN
PRINT
CS_OFC_CD
WRKR_ID
BY CAS_OFC_DMSN_ID
BY CAS_WRKR_DMSN_ID
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *

Note: I join the dimentions together to get the code and worker name since dimentions are small tables they do not to load.


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
 
Posts: 83 | Location: Princeton NJ | Registered: October 26, 2007Report This Post
Expert
posted Hide Post
You could always call a JS function onclick of the radio buttons, dunamically change the value of the "datasource" attribute of the combo and then call the JS function within the IBIRLS.JS or IBIRLS2.JS something like -

ctrl = document.getElementById("combobox1");
populateDynamicCtrl(ctrl);

Note that with IBIRLS3.JS this function no longer exists ad I haven't determined the new processing ... yet!

T



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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Thanks for all the responses! I decided to go ahead with creating 5 list boxes and using Javascript to hide and show as needed. This provides exactly the functionality I was looking for.


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Gold member
posted Hide Post
Can you show and explain how you did this please...?
thanks


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Master
posted Hide Post
Hai Lewis

Can you post code how you did this?
Thank you


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Gold member
posted Hide Post
Sure - here is some code snippets of the method I went with.

I started with the HTML Painter (v7.6.8) to create the objects (list boxes, radio button), then wrote the Javascript functions to support the behavior I wanted.

I created a radio button and five list boxes, one on top of another. The list boxes are pre-populated from the database by fexes based on organization (i.e. regions, divisions, areas, etc.). The value of the radio button relates to the organizational level, like 'Region'. There are five values corresponding to the five list boxes. When I select the Region value, the Region list box shows.

Here are the JS functions:

 
function window_onload() {
//Place 5 listboxes on the form - one each for region list, division list, area list, district list, and store list.
//Default listbox is listbox1 (region).  The listboxes display one on top of the other.
   document.getElementById("listbox1").style.display = "block";
   document.getElementById("listbox2").style.display = "none";
   document.getElementById("listbox3").style.display = "none";
   document.getElementById("listbox4").style.display = "none";
   document.getElementById("listbox5").style.display = "none";
}

function DisplayListBox(hierlevel) {
 
//Determine which listbox and comboboxes are be displayed on top, based on the selection of 'hierlevel' radio button.
   document.getElementById("listbox1").style.display = "none";
   document.getElementById("listbox2").style.display = "none";
   document.getElementById("listbox3").style.display = "none";
   document.getElementById("listbox4").style.display = "none";
   document.getElementById("listbox5").style.display = "none";
 
   if (hierlevel == 'Region') {
      document.getElementById("listbox1").style.display = "block";
                              }
 
   if (hierlevel == 'Division') {
      document.getElementById("listbox2").style.display = "block";
                                }
 
   if (hierlevel == 'Area') {
      document.getElementById("listbox3").style.display = "block";
                            }
 
   if (hierlevel == 'District') {
      document.getElementById("listbox4").style.display = "block";
                                }
 
   if (hierlevel == 'Store') {
      document.getElementById("listbox5").style.display = "block";
                             }
}



Here is the HTML generated from the painter for the radio button, which shows the JS function being called when a particular radio button value is selected.

 
<A id=anchor1 href="javascript:OnExecute(null, 'anchor1')" name=anchor1 requests_list="3" autoExecute="True">Preview</A></SPAN> 
<SPAN id=radio1 contentEditable=false style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; Z-INDEX: 129; LEFT: 20px; WIDTH: 100px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 110px; HEIGHT: 80px; BACKGROUND-COLOR: white" tabIndex=129 operation columns="1" name="HIER_VALUE">
<TABLE contentEditable=false style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; WIDTH: 100%; HEIGHT: 100%" cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD>
<INPUT id=radio1_0 onclick="DisplayListBox('Region');" type=radio CHECKED value=REGION_VALUE name=HIER_VALUE displaytext="Region"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_0>Region</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_1 onclick="DisplayListBox('Division');" type=radio value=DIVISION_VALUE name=HIER_VALUE displaytext="Division"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_1>Division</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_2 onclick="DisplayListBox('Area');" type=radio value=AREA_VALUE name=HIER_VALUE displaytext="Area"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_2>Area</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_3 onclick="DisplayListBox('District');" type=radio value=DISTRICT_VALUE name=HIER_VALUE displaytext="District"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_3>District</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_4 onclick="DisplayListBox('Store');" type=radio value=STORE_VALUE name=HIER_VALUE displaytext="Store"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_4>Store</LABEL></TD></TR></TBODY></TABLE></SPAN>



I hope this helps!


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Gold member
posted Hide Post
I still can't get it to work....here some simple html code. can you tell me where to add the java and tml code you provided?
thanks

< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<META content="MSHTML 6.00.6000.17063" name=GENERATOR>
<script id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto"></BODY></HTML>

This message has been edited. Last edited by: Kerry,


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Gold member
posted Hide Post
Hello
I can't get the list boxes to populate dynamicly from a datasource or a focexec. but if I put a static value in the listbox I see it. please help...here's my code below..thanks..!!

< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<META content="MSHTML 6.00.6000.17063" name=GENERATOR>
<script id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
//Place 5 listboxes on the form - one each for region list, division list, area list, district list, and store list.
//Default listbox is listbox1 (region).  The listboxes display one on top of the other.
   document.getElementById("listbox1").style.display = "block";
   document.getElementById("listbox2").style.display = "none";
   document.getElementById("listbox3").style.display = "none";
   document.getElementById("listbox4").style.display = "none";
   document.getElementById("listbox5").style.display = "none";
}

function DisplayListBox(hierlevel) {
 
//Determine which listbox and comboboxes are be displayed on top, based on the selection of 'hierlevel' radio button.
   document.getElementById("listbox1").style.display = "none";
   document.getElementById("listbox2").style.display = "none";
   document.getElementById("listbox3").style.display = "none";
   document.getElementById("listbox4").style.display = "none";
   document.getElementById("listbox5").style.display = "none";
 
   if (hierlevel == 'Region') {
      document.getElementById("listbox1").style.display = "block";
                              }
 
   if (hierlevel == 'Division') {
      document.getElementById("listbox2").style.display = "block";
                                }
 
   if (hierlevel == 'Area') {
      document.getElementById("listbox3").style.display = "block";
                            }
 
   if (hierlevel == 'District') {
      document.getElementById("listbox4").style.display = "block";
                                }
 
   if (hierlevel == 'Store') {
      document.getElementById("listbox5").style.display = "block";
                             }
}
 {
UpdateData();
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto">
<A id=anchor1 href="java_script:OnExecute[null, 'anchor1')" name=anchor1 autoExecute="True" requests_list="3">Preview</A></SPAN> 
<SPAN id=radio1 contentEditable=false style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; Z-INDEX: 129; LEFT: 20px; WIDTH: 100px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 110px; HEIGHT: 80px; BACKGROUND-COLOR: white" tabIndex=129 name="HIER_VALUE" columns="1" operation>
<TABLE contentEditable=false style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; WIDTH: 100%; HEIGHT: 100%" cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD>
<INPUT id=radio1_0 onclick="DisplayListBox['Region');" type=radio CHECKED value=REGION_VALUE name=HIER_VALUE displaytext="Region"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_0>Region</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_1 onclick="DisplayListBox['Division');" type=radio value=DIVISION_VALUE name=HIER_VALUE displaytext="Division"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_1>Division</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_2 onclick="DisplayListBox['Area');" type=radio value=AREA_VALUE name=HIER_VALUE displaytext="Area"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_2>Area</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_3 onclick="DisplayListBox['District');" type=radio value=DISTRICT_VALUE name=HIER_VALUE displaytext="District"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_3>District</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=radio1_4 onclick="DisplayListBox['Store');" type=radio value=STORE_VALUE name=HIER_VALUE displaytext="Store"> 
<LABEL style="CURSOR: default" tabIndex=129 for=radio1_4>Store</LABEL></TD></TR></TBODY></TABLE></SPAN>
<SELECT id=listbox1 style="Z-INDEX: 130; LEFT: 210px; WIDTH: 240px; POSITION: absolute; TOP: 110px" tabIndex=130 size=3 name=listbox1 datasource="SWFOPSBRANCH.mas" sourcetype="typeMaster" datafield="OPS_VP" displayfield="OPS_VP" dynalldisplayvalue="ALL" addalloption="1" datatype="1" ibiformat="A255V" dfformat="A255V" ibiapp_app="#" ibic_server="LOKI" selectedvalue textvarname="listbox1_TEXT"></SELECT>
<SELECT id=listbox2 style="Z-INDEX: 131; LEFT: 210px; WIDTH: 240px; POSITION: absolute; TOP: 180px; HEIGHT: 54px" tabIndex=131 size=3 name=listbox2 IBIMR_dir="#matty90zv2r1" datasource="app/group_plant_dropdown1.fex" sourcetype="typeFex" dynalldisplayvalue="ALL" addalloption="1" datatype="1" IBIMR_folder="#opsdry4jlt70" IBIMR_domain="untitled/untitled.htm" ibiapp_app></SELECT>
<SELECT id=listbox3 style="Z-INDEX: 132; LEFT: 210px; WIDTH: 240px; POSITION: absolute; TOP: 260px; HEIGHT: 54px" tabIndex=132 size=3 name=listbox3>
<OPTION value=three selected displaytext="three">three</OPTION></SELECT>
<SELECT id=listbox4 style="Z-INDEX: 133; LEFT: 210px; WIDTH: 240px; POSITION: absolute; TOP: 350px; HEIGHT: 54px" tabIndex=133 size=3 name=listbox4>
<OPTION value=four selected displaytext="four">four</OPTION></SELECT>
<SELECT id=listbox5 style="Z-INDEX: 134; LEFT: 210px; WIDTH: 240px; POSITION: absolute; TOP: 420px; HEIGHT: 54px" tabIndex=134 size=3 name=listbox5>
<OPTION value=five selected displaytext="five">five</OPTION></SELECT></BODY></HTML>

This message has been edited. Last edited by: Kerry,


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Virtuoso
posted Hide Post
P L E A S E add CODE tags to your last message!
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
Hi J.Gross,
not sure what i am missing??? I copied all the code from the html screen in html painter.


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Guru
posted Hide Post
Here is a solution that was created entirely in the GUI. No JavaScript required!

  
<!-- Generated by Report Layout Painter v7.6.10 -->
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Gen 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>
 
<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";
 
var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";
 
var ibixmltree="ibixmltree";
 
var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>
 
<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>
 
<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>
 
<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>
 
<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>
 
<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
 
<META name=GENERATOR content="MSHTML 8.00.7600.16700"></HEAD>
<BODY style="OVERFLOW: auto" persistentuniqueid="compUid_1" nextelementuniquenumber="4" elementtype="21" edaconnectionrequired="true">
<SELECT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 200px; TOP: 30px; LEFT: 20px" id=listbox1 tabIndex=1 size=3 persistentuniqueid="compUid_2" name="listbox1">
<OPTION selected value=PERSINFO displaytext="PERSINFO">PERSINFO</OPTION>
<OPTION value=GGSTORES displaytext="GGSTORES">GGSTORES</OPTION>
<OPTION value=VIDEOTRK displaytext="VIDEOTRK">VIDEOTRK</OPTION></SELECT>
<SELECT style="Z-INDEX: 2; POSITION: absolute; WIDTH: 200px; HEIGHT: 400px; TOP: 30px; LEFT: 280px" id=listbox2 tabIndex=2 size=20 persistentuniqueid="compUid_3" name="listbox2"></SELECT>
<SELECT style="Z-INDEX: 3; POSITION: absolute; WIDTH: 200px; HEIGHT: 400px; TOP: 30px; LEFT: 550px" id=listbox3 tabIndex=3 size=3 persistentuniqueid="compUid_4" name="listbox3"></SELECT>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=test type=hidden name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibic_server value=EDASERVE type=hidden isdataserversarea="1" name="ibic_server">
<xml id=focus_xmlelement>
<script type="text/xml">
<rootxmlnode top="20" left="1157" width="150" height="130">
<variables></variables>
<input_controls>
<input_control bindcontrolid="compUid_2" elementtype="9" name="listbox1" id="listbox1" multiple="0" inbinding="1" onetimepopulated="1">
<link linktype="default">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
<data_info modifiedrequest="1">
<static_values>
<static value="PERSINFO" display="PERSINFO" selected="1"></static>
<static value="GGSTORES" display="GGSTORES" selected="0"></static>
<static value="VIDEOTRK" display="VIDEOTRK" selected="0"></static></static_values></data_info></condition></link></input_control>
<input_control bindcontrolid="compUid_3" elementtype="9" name="listbox2" id="listbox2" multiple="0" inbinding="1" onetimepopulated="0">
<link linktype="default" from="compUid_2">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="DATASOURCE" resolveparameter="DATASOURCE">
<data_info datatype="1" sourcetype="typeMaster" modifiedrequest="1" datafield="FIELDNAME" displayfield="FIELDNAME" selectedvalue="STATE">
<![CDATA[-DEFAULT &DATASOURCE = PERSINFO;
CHECK FILE &DATASOURCE HOLD
TABLE FILE HOLD
SUM FST.FIELDNAME
BY FIELDNAME
ON TABLE PCHOLD FORMAT XML
END]]></data_info></condition></link></input_control>
<input_control bindcontrolid="compUid_4" elementtype="9" name="listbox3" id="listbox3" multiple="0" inbinding="1" onetimepopulated="0">
<link linktype="default" from="compUid_3">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="FIELDSEL" resolveparameter="FIELDSEL">
<data_info datatype="1" sourcetype="typeMaster" modifiedrequest="1" selectedvalue="IL" datafield="FIELDVAL" displayfield="FIELDVAL">
<![CDATA[SET ASNAMES = ON
-DEFAULT &DATASOURCE = PERSINFO;
-DEFAULT &FIELDSEL = STATE;
TABLE FILE &DATASOURCE
SUM FST.&FIELDSEL AS FIELDVAL
BY &FIELDSEL AS FIELDVAL
ON TABLE PCHOLD FORMAT XML
END]]></data_info></condition></link></input_control></input_controls>
<other_bound_objects></other_bound_objects>
<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Gold member
posted Hide Post
Dan
very interesting code...I will try it out and let you know...thanks so much for sending it..!


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Gold member
posted Hide Post
Sorry for not being too responsive - I am at a client site, and we are in the middle of a production implementation.

There was a question about getting the listboxes to load dynamically. I developed some load fexes and used the painter to create the list boxes and tied the fexes to the list boxes.

The load fex creates an XML file used by the list box.

Here is generated code - keep in mind this is 7.6.8, so you will probably not be able to plug this into your html.

 <SELECT id=listbox5 style="FONT-SIZE: 8pt; Z-INDEX: 137; LEFT: 110px; WIDTH: 190px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 90px; HEIGHT: 180px" tabIndex=137 size=3 name=HIER_STORE operation dynalldisplayvalue="ALL" datasource="app/mrd_olap_adhoc_hier_parms_store.fex" datatype="1" sourcetype="typeFex" IBIMR_domain="adhocman/adhocman.htm" IBIMR_folder="#managementad" ibiapp_app cacheruntimedata="0" attvariables="SECUR_CHK;" boundtovariable="1" selectedvalue accept="0" addalloption="1" displayfield></SELECT> 
<SELECT id=listbox1 style="FONT-SIZE: 8pt; Z-INDEX: 138; LEFT: 110px; WIDTH: 190px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 90px; HEIGHT: 180px" tabIndex=138 size=3 name=HIER_REGION operation ElementToPaste="true" dynalldisplayvalue="ALL" datasource="app/mrd_olap_adhoc_hier_parms_region.fex" datatype="1" sourcetype="typeFex" IBIMR_domain="adhocman/adhocman.htm" IBIMR_folder="#managementad" ibiapp_app cacheruntimedata="0" attvariables="SECUR_CHK;" boundtovariable="1" selectedvalue accept="0" addalloption="1" displayfield></SELECT> 
<SELECT id=listbox4 style="FONT-SIZE: 8pt; Z-INDEX: 136; LEFT: 110px; WIDTH: 190px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 90px; HEIGHT: 180px" tabIndex=136 size=3 name=HIER_DISTRICT operation ElementToPaste="true" dynalldisplayvalue="ALL" datasource="app/mrd_olap_adhoc_hier_parms_district.fex" datatype="1" sourcetype="typeFex" IBIMR_domain="adhocman/adhocman.htm" IBIMR_folder="#managementad" ibiapp_app cacheruntimedata="0" attvariables="SECUR_CHK;" boundtovariable="1" selectedvalue accept="0" addalloption="1" displayfield></SELECT> 
<SELECT id=listbox3 style="FONT-SIZE: 8pt; Z-INDEX: 135; LEFT: 110px; WIDTH: 190px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 90px; HEIGHT: 180px" tabIndex=135 size=3 name=HIER_AREA operation ElementToPaste="true" dynalldisplayvalue="ALL" datasource="app/mrd_olap_adhoc_hier_parms_area.fex" datatype="1" sourcetype="typeFex" IBIMR_domain="adhocman/adhocman.htm" IBIMR_folder="#managementad" ibiapp_app cacheruntimedata="0" attvariables="SECUR_CHK;" boundtovariable="1" selectedvalue accept="0" addalloption="1" displayfield></SELECT> 
<SELECT id=listbox2 style="FONT-SIZE: 8pt; Z-INDEX: 134; LEFT: 110px; WIDTH: 190px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 90px; HEIGHT: 180px" tabIndex=134 size=3 name=HIER_DIVISION operation ElementToPaste="true" dynalldisplayvalue="ALL" datasource="app/mrd_olap_adhoc_hier_parms_division.fex" datatype="1" sourcetype="typeFex" IBIMR_domain="adhocman/adhocman.htm" IBIMR_folder="#managementad" ibiapp_app cacheruntimedata="0" attvariables="SECUR_CHK;" boundtovariable="1" selectedvalue accept="0" addalloption="1" displayfield></SELECT> 


Dan, if I can figure out how you were able to develop the html, that would be great! Unfortunately, my experience with the post 7.6.8 version of the painter is pretty minimal and disappointing. I do have some questions for you:

Was your entire html developed in the painter, or did you enhance it manually? I see dialogue manager and WF code - did you add that? Do you use the html as a web page by itself, or as an HMTLFORM in a fex?


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Guru
posted Hide Post
JRLewis - I developed the page entirely in the HTML Composer. The Dialog Manager and WebFOCUS Code was added in the Properties and Settings window for the listboxes. This is done on the Parameters tab.
The page will run just fine by itself but you could certainly call it from a .fex procedure using -HTMLFORM.
In fact, I just realized recently that launching an .htm file from a .fex using -HTMLFORM is the only way I can resolve some Global AmperVariables on the web page. I may need to start using that technique more often.

Regards,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

I need to do something similar.

I copied your code and created a fex that calls the code in an HTML file - clicking on any of those three master names does not load anything into the two select lists. I am on v7.6.8 so I suppose your v7.6.10 code will not work.

I simply need to reload one select list.

Thanks,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Tony's suggestion saved me! Thanks very much.

Code in place and working. Now I'll run away and hide out in Bali, because I don't want to be around when they upgrade one minor version an everything crashes.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
An update on my previous posting (glad it helped Francis).

I have a process that I am currently using where I need to refresh the third combo in a chained list. E.g I have three controls that are chained with respective ids of "edit1", "edit2" and "edit3" - very imaginative I know Wink As part of my process I update (using an AJAX call using MODIFY) values in my database that will load into the "edit3" combo, and I need to refresh the contents so that the user does not have to reset "edit2" and then set it back again, purely to get the contents of "edit3" updated (hope that's clearer than I think it is Confused).

To achieve this I use the following JavaScript, and this works in 7.6.10 upwards. Not managed to get it working in 7.6.9 but will be looking at that soon, I hope.

  var objCtrl = document.getElementById("edit2");
  DoResetDownChainControls(objCtrl);

Please note that this is an IBIRLS3 function and therefore earlier releases that have IBIRLS2 or IBIRLS are unlikely to have that function.

Also, bear in mind what Brian Suter has mentioned in other posts.

T



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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
What I *love* is that simply opening and saving a HTML Composer file created in a prior version may cripple it - whatever happened to Information Builders steadfast rule regarding backwards compatibility?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Value of One Control Dynamically Impacting Another in HTML Composer

Copyright © 1996-2020 Information Builders