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.
Hope you're doing well today. I have a question which I could not find an answer to through searching.
Is it possible to give a list box (that contains data) the 'ALL' option (from HTML Composer) through html/javascript?
When the user clicks on a specific report, the listbox turns from Single Selection to Multiple Selection, and I would like to have it also feature the 'ALL' option without having to already have it set as ON in the HTML Composer.
I currently have the following function that makes the selection multiple and if any other report is selected (counter > 1) then the selection remains single selection.
Found a solution. Just had to F12 to see what the HTML was for the HTML Composer specific code and it turned out to be an < option > so manipulation was made easy through the following code:
var opt = document.createElement('option');
opt.value='_FOC_NULL';
lb_wi_current.multiple=true;
lb_wi_current.appendChild(opt);
var options = document.getElementById("lb_wi_current");
options.insertBefore(opt, lb_wi_current.options[0]);
lb_wi_current.options[0].text='ALL';
This message has been edited. Last edited by: MikeSanti,
WF 7.7.03 - W7 - HTML, PDF, EXL
Posts: 4 | Location: Florida | Registered: November 10, 2014
If you have it called from a non-embedded procedure it would be relatively easy to call a fex that generate the data with the 'ALL' option or one without based on your selection criteria.
Or another option is to have two controls having the same position on the HTML but one with the 'ALL' option and the other without and then show or hide them according to the selection.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Is lb_wi_current.xxxxx something you developed or something anyone can use? I've been trying to figure out how to test what page within a portal a user is on, and depending on the page the user is on, controls within a filter.html hide/unhide or disable/enable. Do you know if this is possible?
Thanks!
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015
Originally posted by MartinY: If you have it called from a non-embedded procedure it would be relatively easy to call a fex that generate the data with the 'ALL' option or one without based on your selection criteria.
Or another option is to have two controls having the same position on the HTML but one with the 'ALL' option and the other without and then show or hide them according to the selection.
Thank you for your methods Martin. I was hoping there would be a quick and easy way, sort of like a function or something to make it so but alas, I will proceed with the fun alternative.
quote:
Originally posted by CoolGuy: Mike,
Is lb_wi_current.xxxxx something you developed or something anyone can use? I've been trying to figure out how to test what page within a portal a user is on, and depending on the page the user is on, controls within a filter.html hide/unhide or disable/enable. Do you know if this is possible?
Thanks!
You're a pretty Cool Guy, CoolGuy. Nothing out of the ordinary here. Anyone can use the .multiple to set it as a multiple selection or single selection (the .addalloption was me trying to see if it was built in to WebFocus).
The pages that these users go on I'm assuming will have their own separate files? Because what you're asking for is totally feasible. There may be topics that cover such through the forum already as well if you haven't tried that.
WF 7.7.03 - W7 - HTML, PDF, EXL
Posts: 4 | Location: Florida | Registered: November 10, 2014
Found a solution. Just had to F12 to see what the HTML was for the HTML Composer specific code and it turned out to be an < option > so manipulation was made easy through the following code:
var opt = document.createElement('option');
opt.value='_FOC_NULL';
lb_wi_current.multiple=true;
lb_wi_current.appendChild(opt);
var options = document.getElementById("lb_wi_current");
options.insertBefore(opt, lb_wi_current.options[0]);
lb_wi_current.options[0].text='ALL';
Posts: 4 | Location: Florida | Registered: November 10, 2014