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.
I have a chained pair of combobox controls in a launch page. I want to invoke a javascript function when the parent or child control is loaded (i.e., as soon as either the initial load or a refresh of the list of OPTIONS for the SELECT tag is completed). How do I hook the code to that event?
I am using HTML Composer in Dev Studio 7.6.8 to create the page, but not averse to manual revisions.This message has been edited. Last edited by: Kerry,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
// Add an event handler to the new control which has to be done using a seperate function
NewCtrl = document.getElementById("somecombo");
NewCtrl.attachEvent("onchange", createSelects);
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, 2004
I don't think so -- "onchange" (like onblur or onsubmit) is fired by a user action (selecting options), and not by programmatic surgery performed on the document.
We're talking about an html page that Composer generates, in which the SELECT tag is initially bare -- no OPTION tags are included in the static code. The page's JavaScript complex runs some function to dynamically load or reload the option lists -- in a chained set of comboboxes, to load the parent control's options when the page is loaded, and to refresh the child control's options when the parent list is reloaded or the parent's selectionindex changes. Either way, the completion of the dynamic loading of the options does not trigger an event -- it cannot: the browser has no clue whether you have more option tags to insert.
So it appears I would have to over-ride or extent some of IBI's standard code. I've traced this as far as the several "populateDynamic..." functions in ibirls2.js (and ibirls3.js). Has anyone else travelled down this path?
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Misread your post and just spotted the "refresh of the list of OPTIONS" and you did mention "event"
Do you really need the JS to run exactly at the point the options are loaded in the first instance? If so then you will probably have to introduce your own point in the ibirls(n) to run your own code. If not then just run it in the normal location for the initial load and then append an onchange event for when the refresh occurs through the chaining.
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, 2004
I'm offsite today so I cannot test, but I'd wager a beer that the programmatic dynamic loading/reloading of a Select's Options list doesn't trigger an onChange event.
What I am trying to accomplish is pretty basic:
1. Make the top entry of certain selection lists the default. (That option could join the others, like adding ALL, in the property panel.) -- For financial reports that by default run on a year-to-date basis (with the user selecting a fiscal year and then a fiscal period[=month] from a list of closed periods), that would make the latest month (the final month for closed years, the latest completed month for current year) the default.
2. For some chained lists, When the parent list has only one option select it and load the child list accordingly; and when the child list has only one option, select it. -- For a report of a two-layer hierarchy -- say, city data where the user selects the State and then the City, if all the Cities within the particular user's security scope lie in a single state, the one state shown should be auto selected, and Cities list populate accordingly, upon load, rather than waiting for the user to select the only within-scope state in order to reveal its within-scope cities.
Those behaviors, as developer-selectable options, both sound to me like reasonable expectations of a workbench user interface for creating a reporting user interface.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005