[CLOSED] HTML Composer: How to reset double-list control?
I'd like to use a javascript call to reset a double-list control when I click on a button.
I tried IbComposer_ResetDownChainControls, but that doesn't work, as it's not a chained control. I'd rather not have to make the double-list control chained to a dummy parent.
Thanks,This message has been edited. Last edited by: FP Mod Chuck,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
The one thing I don't like is that the previously selected values are put at the bottom, which means I would need to use javaScript or jQuery to sort the selectfrom list box.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 06, 2012, 12:37 PM
MattC
quote:
The one thing I don't like is that the previously selected values are put at the bottom, which means I would need to use javaScript or jQuery to sort the selectfrom list box.
Did you find anything out about sorting the values correctly from the selectfrom?
WebFOCUS 8.1.05
November 06, 2012, 01:12 PM
Francis Mariani
Matt, unfortunately not.
In a previous project, onInitialUpdate I used jQuery to save the selectfrom listbox in a hidden listbox and the reset list box button would copy that hidden listbox back to selectfrom. A little convoluted but it worked and you don't really need to use jQuery...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Are you sure the unique id of that field is indeed 'customselect1'? Are you seeing any javascript errors in the console (F12)?
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
June 14, 2017, 10:39 AM
BM
Hi, here is the solution. document.getElementById('customselect1_selectto').options.length = 0;