Focal Point
[SOLVED] How to get the index value of a combo box submitted from a lauch page

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

February 01, 2012, 06:30 PM
Pku
[SOLVED] How to get the index value of a combo box submitted from a lauch page
Hi All,

In a fex file, I am looking for a way to get the index's value of a dynamic combo box that is submitted from a lauch page(created in HTML Composer). The values of the combo box are populated by another sorted fex file. For example, if the user select the second value from the combo box(dropdown), then the index value should be "1".

Thank you,
Pkupp

This message has been edited. Last edited by: Kerry,


Thanks,
Pku

Focus, WebFocus 8201 on Windows
February 01, 2012, 06:38 PM
Waz
You could do this with javascript.

Just pass another variable. It would have to be populated either on submit, or on change of the combo box.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 01, 2012, 08:01 PM
Dan Satchell
In the fex where you create the option list for your combobox, write the index value and the display value as the pairs for each option (instead of using the display value for both). In the Properties for your combobox, make certain you have NOT checked the "Pass display value" box. With this arrangement, when the user selects on option from the combobox, the index value should be passed to the called program.


WebFOCUS 7.7.05
February 02, 2012, 04:38 PM
Pku
Thanks for responding Waz and Dan,

I used javascript to get it: document.getElementById("combobox1").selectedIndex

Thanks again.

This message has been edited. Last edited by: Pku,


Thanks,
Pku

Focus, WebFocus 8201 on Windows