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 an HTML document as a parameter page. On it is a drop down list which includes the 'ALL' option.
I'd like the ALL option to be there, but only when the list has more than one item. [What I mean is, if the drop down only has one choice, then ALL doesn't make sense for the user.]
Anyone ever do something like that?This message has been edited. Last edited by: FP Mod Chuck,
If you created an HTML page using the App Studio GUI, you can probably use the IbComposer_removeSelectOption function and pass the "All" value. I haven't really used the GUI to create pages, so I can't tell you exactly where to place the code, but run this after the page has loaded.
I'm not sure what the problem is. I created a simple parameter screen in HTML doc. One drop down with the ALL option using MODEL from the car file.
Also I simplified the javascript to just remove the ALL option from the list and tried it in all of the following functions.
I found the reference searching the technical content library in the "Using JavaScript Code With HTML Canvas Pages". But the only hits I could find were 8.2 references.
So, I must be using the IbComposwer_removeSelectionOption() wrong or, this doesn't work in 8.09.
Listing of the functions in my Embedded JavaScript/CSS window. I've moved the code around to each one to see if the event would make a difference. The code is shown here in the bottom function, onInitialUpdate(). Has anyone used this function successfully in v8.09 under HTML Composer?
if(typeof(bRuntime) != 'undefined') {
// TODO: Add your inline runtime code here
}
//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
//Begin function combobox1_ononafterload
function combobox1_ononafterload(ctrl) {
}
//End function combobox1_ononafterload
//Begin function combobox1_ononbeforeload
function combobox1_ononbeforeload(ctrl,arrValuesToLoad) {
}
//End function combobox1_ononbeforeload
//Begin function window_onInitialUpdate
function window_onInitialUpdate() {
}
//End function window_onInitialUpdate
//Begin function combobox1_onInitialUpdate
function combobox1_onInitialUpdate() {
}
//End function combobox1_onInitialUpdate
//Begin function onInitialUpdate
function onInitialUpdate() {
IbComposer_removeSelectOption("combobox1",arr["All"]);
}
//End function onInitialUpdate
This message has been edited. Last edited by: Don Garland,
Don, Using AS 8009, I was able to have the following code do what you want.
var lb = document.getElementById('listbox1');
arrTexts = new Array();
for(i=0; i < lb.length; i++)
{
if (lb.options[i].text == 'ALL' && lb.length == 2) {
document.getElementById('listbox1').remove(i);
}
else {
arrTexts[i] = lb.options[i].text;
}
}
Add this code to UpdateData() function so that when the page is loaded, this is executed first. One more thing, make sure 'ALL' is typed all upper case as JavaScript is case sensitive.This message has been edited. Last edited by: SeyedG,
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010