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] Chaining option

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Chaining option
 Login/Join
 
Gold member
posted
When using chaining, it all works fine if you manually change the values in the comobox. However if we change the value in comobox using javascript EX: document.form2.region.selectedIndex = 2;

then chaining doesn't work

Why

This message has been edited. Last edited by: Kerry,
 
Posts: 61 | Location: New York City | Registered: July 20, 2006Report This Post
Expert
posted Hide Post
Because JavaScript functions are triggered by the onChange event. If you're changing the selected value in a select list with JavaScript, you have to call the Javascript normally called by the OnChange event - the onChange is not detected when JavaScript is used.


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
Virtuoso
posted Hide Post
As Francis typed, try:
document.form2.region.onchange();


This may not work, but standard DOM references will. If the id of the select box is 'combobox1', then it would be:
document.getElementById('combobox1').onchange();


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Thanks for that code.


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
Gold member
posted Hide Post
What we are doing is. A reset button is used to rest the combobox back to the first Value.

after the combobox has been reset by javascript the chained combobox still have the values from the parent combobox before the reset.

Example. If we reset the first box to all the second should be loaded with all values. mannully this works, but don't if you change it with Javascript.
 
Posts: 61 | Location: New York City | Registered: July 20, 2006Report This Post
Guru
posted Hide Post
As Francis already pointed out, what you are seeing is the normal behaviour when changing HTML controls with javascript. A change from javascript doesn't count as an OnChange() for that control.

So when you reset the combobox with javascript, the HTML and WebFOCUS are not yet aware of the change. Use the code that dhagen posted or try the populateDynamicCtrl(ctrl); to force the chaining code to run.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
I do this many times when I pull a value for a particular User - I store the last choice made by a user so that they can be presented with that the next time they run the process.

All you have to issue after changing the selectedIndex value is -

   DoResetDownChainControls(document.getElementById("combobox1"));
Where combobox1 is the Id of the control you have just changed. The JavaScript function "DoResetDownChainControls" is contained in ibirls2.js as supplied by IB.

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 alot guys, it worked
 
Posts: 61 | Location: New York City | Registered: July 20, 2006Report 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] Chaining option

Copyright © 1996-2020 Information Builders