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     How Do I Refresh A Web Page Drop Down List On A Change In Another Drop Down List?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How Do I Refresh A Web Page Drop Down List On A Change In Another Drop Down List?
 Login/Join
 
Member
posted
I have a web page with two independent drop down lists. One list contains the oracle connection string to a database and the other list contains a query from that database.

What I want to do is to refresh the database query whenever the connection string is changed.

I cannot chain the two elements together because they are not a part of the same table, but I want to create a 'chain' like reaction on the web page. I'm guessing it will require a little javascript, but that's okay.

Does anyone have any ideas of how to accomplish this?

Thanks,


Ron Woods
San Antonio Express-News
Release: WebFOCUS 7.1.1
OS/Platform: Windows XP SP2 x86 32bit
O/P Formats: Primarily pdf and xls
 
Posts: 22 | Location: San Antonio, Tx | Registered: October 20, 2005Report This Post
Expert
posted Hide Post
You should be able to use the same technique I referred you to in your other topic. Keep reading the rest of the section as it discusses chaining with procedures. While I haven't tried it, I can't imagine that it would be a problem to use two data sources.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Ginny,

I agree it should work, but after selecting both elements (while holding down the shift key) the only chain control that is activated is is the list chain elements.

I also searched the forum and found a posted that stated chaining only works when the chained objects are all part of the same result set.


Ron Woods
San Antonio Express-News
Release: WebFOCUS 7.1.1
OS/Platform: Windows XP SP2 x86 32bit
O/P Formats: Primarily pdf and xls
 
Posts: 22 | Location: San Antonio, Tx | Registered: October 20, 2005Report This Post
Expert
posted Hide Post
okey dokey.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Ron,

If I understand correctly, you have in your first list box a number of connection strings. Are these static or are they retrieved from a file?

In the second list box you say you have a query. Is it the result of an SQL SELECT or is it the SELECT? If it is the result, where do you get the SELECT statement? How is it dependent upon the connection string?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Daniel,

I can make the connection string list box either static or dynamic - right now it is dynamic.

The second list box is the results of a query that is executed when the page is opened (onload()). What I want to do is have the query re-executed whenever the connection list box is changed.

What I want to do in the on_change javascript of the connection list box is to rerun the query that populates the second list box.

We have two oracle databases that are structural mirrors of each other (live and test). I want to be able to run reports off either database - which I can do with the connection list box.

The problem comes with the second list box. Each database contains the same tables, but not identical data - in this case publications. So I want to display the correct publication list for each system.

Thanks


Ron Woods
San Antonio Express-News
Release: WebFOCUS 7.1.1
OS/Platform: Windows XP SP2 x86 32bit
O/P Formats: Primarily pdf and xls
 
Posts: 22 | Location: San Antonio, Tx | Registered: October 20, 2005Report This Post
Virtuoso
posted Hide Post
Ron,

The way we do it is with our WrapApp product. To each object (for example the list box with the connections) we can attach a trigger which is a fex. This fex can populate the second listbox using a simple HOLD file.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Ron,

The call made within IBIRLS2.js is -

populateDynamicCtrl(ctrl);

You would need to populate the ctrl with the object you want to re-populate.

i.e.

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

Be warned though that this will not pass the value of the chained parent object.

I would persevere with chaining if I were you as IBIRLS2.js functions should cope effectively with your requirement providing you chain the items in the correct order so that each parent items value is passed in the execution string (URL) for the control.

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
Ron,

Here's a launch page with chained controls created in painter (a rare occasion for me Wink) using 7.6.4. You'll see what js is created for the chaining within the IBI_Chainscript script section.

<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var rltVersion = "764";
var cgipath = "cgipath";
var ibirls = "ibirls2";

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 src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);</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>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<FORM id=form2 style="Z-INDEX: 2; LEFT: 10px; WIDTH: 760px; POSITION: absolute; TOP: 10px; HEIGHT: 300px" tabIndex=2 name=form2
 onsubmit="OnExecute(this);return false;" method=post default_slider_type="4" form_prompt_location="1" form_number_of_visible_rows="4"
 form_number_of_columns="4" vert_dist_between_controls="10" form_hor_dist_between_controls="10" form_dist_between_desc_and_input="10">
<INPUT id=form2Submit style="Z-INDEX: 3; LEFT: 0px; BACKGROUND-IMAGE: url(/ibi_html/javaassist/ibi/html/describe/run16.gif);
 WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 273px; HEIGHT: 22px; BACKGROUND-COLOR: lavender"
 tabIndex=3 type=submit value=" " name=ITEM1>
<INPUT id=form2Reset style="Z-INDEX: 4; LEFT: 43px; BACKGROUND-IMAGE: url(/ibi_html/javaassist/ibi/html/describe/reset.gif);
 WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 273px; HEIGHT: 22px; BACKGROUND-COLOR: lavender"
 tabIndex=4 type=reset value=" " name=reset1>
<FIELDSET id=form2_formbodyid style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; Z-INDEX: 5; LEFT: 5px; PADDING-BOTTOM: 0px;
 OVERFLOW: auto; WIDTH: 750px; BORDER-TOP-STYLE: none; PADDING-TOP: 0px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none;
 POSITION: absolute; TOP: 5px; HEIGHT: 260px; BORDER-BOTTOM-STYLE: none" tabIndex=5 formbody="1">
<SELECT id=combobox1 style="Z-INDEX: 6; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 15px" tabIndex=6 name=Country 
dynalldisplayvalue="All Countires" addalloption="1" inchainindex="1" chainnumber="0" cacheruntimedata="0"
 ibiapp_app="anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="chained_control_1.fex"
 newchainnumber="0"></SELECT>
<SELECT id=combobox2 style="Z-INDEX: 7; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 55px" tabIndex=7 name=Car
 dynalldisplayvalue="All Cars" addalloption="1" inchainindex="2" chainnumber="0" cacheruntimedata="0"
 ibiapp_app="anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="chained_control_2.fex"
 newchainnumber="0" attvariables="Country;"></SELECT>
<SELECT id=combobox3 style="Z-INDEX: 8; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 95px" tabIndex=8 name=Model
 dynalldisplayvalue="All Models" addalloption="1" inchainindex="3" chainnumber="0" cacheruntimedata="0"
 ibiapp_app="anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="chained_control_3.fex"
 newchainnumber="0" attvariables="Country;Car;"></SELECT>
<SPAN id=text1 style="Z-INDEX: 9; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 15px; HEIGHT: 19px"
 tabIndex=9>Country</SPAN>
<SPAN id=text2 style="Z-INDEX: 10; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 55px; HEIGHT: 19px"
 tabIndex=10>Car</SPAN>
<SPAN id=text3 style="Z-INDEX: 11; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 95px; HEIGHT: 19px" tabIndex=11>
<DIV>Model</DIV></SPAN></FIELDSET></FORM>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden inputcontrolids="combobox1;combobox2;combobox3">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=anthonyalsford name=ibiapp_app>
<SCRIPT id=IBI_ChainScript type=text/javascript>
<!--
window.chain0=new Array(1);
window.chain0[0]=new String("combobox1;combobox2;combobox3");
window.chain0[1]=0
//--></SCRIPT>
</BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>

These are the fexes used to populate the controls -
-* File chained_control_1.fex
TABLE FILE CAR
SUM FST.COUNTRY
BY COUNTRY
ON TABLE PCHOLD FORMAT XML
END
-* File chained_control_2.fex
-DEFAULT &Country = 'FOC_NONE'
TABLE FILE CAR
SUM FST.CAR
BY CAR
WHERE COUNTRY EQ '&Country'
ON TABLE PCHOLD FORMAT XML
END
-* File chained_control_3.fex
-DEFAULT &Country = 'FOC_NONE'
-DEFAULT &Car     = 'FOC_NONE'
TABLE FILE CAR
SUM FST.MODEL
BY MODEL
WHERE COUNTRY EQ '&Country'
WHERE CAR     EQ '&Car'
ON TABLE PCHOLD FORMAT XML
END

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
Ron:
Don't know if my experience relates to the way you built your dropdowns or not.
Chaining drop-downs works with independent result sets from separate procedures. However, one issue I ran into a while ago is that the drop downs were originally built (in the GUI) with static data as the source. Later, when they were converted to use a procedure as the source, chaining would not work. Deleting and recreating two NEW drop-downs with a procedure as the data source magically made the chaining work! I classified that as a 'Gotcha!!'


Diptesh
WF 7.1.7 - AIX, MVS
 
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006Report This Post
Member
posted Hide Post
Diptesh,

Thanks for the info. I tried deleting and rebuilding with the dynamic info. My problem now is that I cannot get the chaining feature to activate.

I am following the instructions in the manual (parameter control values on dynamic, hold the shift key and select the two objects) but I just can not seem to get the chaining icons to activate.


Ron Woods
San Antonio Express-News
Release: WebFOCUS 7.1.1
OS/Platform: Windows XP SP2 x86 32bit
O/P Formats: Primarily pdf and xls
 
Posts: 22 | Location: San Antonio, Tx | Registered: October 20, 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     How Do I Refresh A Web Page Drop Down List On A Change In Another Drop Down List?

Copyright © 1996-2020 Information Builders