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 four Html launch pages. Now, I want to create the main launch page to let user to select from a drop down box, which is a combobox. From “Requests & Data sources”, I have 4 Html there. In “Tasks & Animations”, I have “task2 Selection Changed comobox1 HTML File/xxxxx window” there, and task3, task4, task5 are similar with task2.
In “Embedded JavaScript/CSS”, I have “function comobox1_onchange(event)…” However, I think the Javascript I copied is not right, it’s not working. If any of you are javascript expert, please let me know how to code in “Embedded JavaScript/CSS” to make drop down box work. Thank you a lot.This message has been edited. Last edited by: EdHou,
function combobox1_onchange(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here var selValue = IbComposer_getCurrentSelection('combobox1'); for(var i = 0; i < combobox1_onchange.length; i++){
if (selValue == 'First Report' && combobox1[i].checked) { IbComposer_triggerExecution('task2',1); } else if (selValue == 'Second Report' && combobox1[i].checked) { IbComposer_triggerExecution('task3',1); }else if (selValue == 'Third Report' && combobox1[i].checked) { IbComposer_triggerExecution('task4',1); }else if (selValue == 'Fourth Report' && combobox1[i].checked) { IbComposer_triggerExecution('task5',1);
The fact that you state that you "copied" some JavaScript leads me to believe that you do not know any JavaScript?
If that is the case then I would really urge you to try and learn it. Look at some sites such as W3Schools.com for some tutorials. You will benefit from it if you are going to be developing similar processes!
If I understand you correctly, you want to trigger a call to the internal "IbComposer_triggerExecution" function to initiate a task that you have built within the GUI, depending upon what the user has selected within a drop down list?
If that is the case then I would suggest using the ability of having the value within the drop down list declared as a procedure - which (providing you get it correct) should trigger the procedure as you need. There have been topics on this before on the Forum.
Alternatively, you could use a case statement like the following -
function combobox1_onchange(event) {
var eventObject = event ? event : window.event;
var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement;
// TODO: Add your event handler code here
switch(document.getElementById("combobox1").selectedIndex) {
case 0:
IbComposer_triggerExecution('task2',1);
break;
case 1:
IbComposer_triggerExecution('task3',1);
break;
case 2:
IbComposer_triggerExecution('task4',1);
break;
case 3:
IbComposer_triggerExecution('task5',1);
break;
default:
IbComposer_triggerExecution('task2',1);
}
}
//End function combobox1_onchange
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