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.
Has anybody found out how to handle the listbox with multiselect? Assume the listbox1_onclick function is as follows: alert(this.listbox1.options.selectedIndex);
If I click on eg. row no 2 in a listbox it says 0 (wrong) at first attempt, but on the second attempt it says 1 (correct).
Fernando, a little bit closer. First I get an alert with the value 0 and when I close that one another alert pop up with the correct value. What causes the first alert to pop up?
I'm on WF 7.1.4 running on localhost on an XP box with Tomcat 5.0.
One of our people reviewed the code and here is his suggestion.
This works as expected as the JavaScript event you want to use, is the onChange event and not the onClick event. The below code will demonstrate the differences.
Kerry, thanks, that works fine, but there seem to be a problem with a listbox in a chain. For some reason the chaining seem to disable the onchange event. If I remove the chaining it works fine. Any ideas?
The onchange event removal has been noticed before (sorry, can't locate the posts at the moment) but the way around it it to reassign the onchange event as part of the load procedure.
The code that I use is -
<SCRIPT id=OnloadHandler>
function OnLoad() {
<!--startibilines-->
UpdateData();
<!--endibilines-->
// Overcome a bug in IB's script that clears an onchange event for a select
SelCtrl = document.getElementById("SELECT1");
SelCtrl.attachEvent("onchange", createSelects);
}
// This function adds an event handler to a control
function createSelects() {
this.displayElement = window.event.srcElement;
// This next line contains what would normally be in your onchange event action
Show_Selects(this.displayElement.id);
}
</SCRIPT>
lycka till!
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
thanks a lot. However, I decided to have a clickable text below the listbox instead, which will show all the selections made in the listbox using an alert message.