Focal Point
[solved]radio button on change event reloads chained comboboxes

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2967072776

July 16, 2015, 09:54 AM
Jay Potter
[solved]radio button on change event reloads chained comboboxes
I am trying to pass a parameter value, depending on a radio button selection, to the where clause in my code that loads my comboboxes that are chained together.

Can I use javascript to find value of a radio button and pass it to the where clause in my code that populates the combobox?

Whenever the user clicks on the radio button, the onclick event would reload the comboboxes.

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
July 16, 2015, 10:06 AM
Francis Mariani
Because a radio button control is made of more than one HTML object - it's best to use the HTML Composer "API" to determine which radio button was selected:

var myFormat = IbComposer_getCurrentSelection('WFFMT');

Passing the value to the WHERE statement is a different matter - I hope someone pipes in with a suggestion.


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
July 16, 2015, 11:27 AM
Doug
Always, imho:
quote:
it's best to use the HTML Composer
Why not just chain the radio buttons to the combobox, in the composer?
July 17, 2015, 08:24 AM
Jay Potter
Thanks. I should have thought of that. Chaining a radio button and comboboxes is easy. But my next question is can you chain 2 calendar objects to a combobox. I would like to filter a combobox based on a "From" date and a "To" date. That is what I was original going for when I first ran into my challenge with filtering combox based on 2 values.

Thanks again on answering the first question.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
July 17, 2015, 08:38 AM
Doug
Interesting concept... I haven't done that specifically. However, I would think that it's doable IF the comboboxes to which you are chaining TO has all the values which can be selected in the calendar controls...
July 17, 2015, 08:45 AM
Jay Potter
Can you chain 2 objects into 1 object?


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster