Focal Point
[CLOSED] problem in loading data in Chained Listboxes

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

April 20, 2009, 11:07 AM
Srinivas429
[CLOSED] problem in loading data in Chained Listboxes
HI All,

I have a chained listboxes. so On change of event in first list box, I have to load 2nd list box values corresponding to the value selected in 1st listbox.

Could anybody give suggestion how to achieve this functionality.

This message has been edited. Last edited by: Kerry,
April 20, 2009, 11:20 AM
Moogle
Do not use a javascript event to trigger the loading of the second list box. WebFOCUS HTML Layout Painter / Composer has a built-in way to chain controls.

All you need to do is build a fex that outputs both the key fields and the description fields in XML format. They need to be in a particular order, but I'll leave that to your research to figure out. Once you have the fex built, make each of the list boxes have dynamic source and point each one to your new fex. Then, select all the list boxes and click the chaining icon on the toolbar. If you've done it right, you will now have some chained list boxes.

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
April 22, 2009, 10:35 PM
StuBouyer
While Moogle is right that WebFOCUS Layout painter/composer has a built in way to chain controls, there are instances were the auto-chaining doesn't work exactly as you would wish - different data sources with odd naming conventions for fields really bugs the chaining code.

If this is the case then you can force WebFOCUS to update a dynamic control (ie one feeding from a fex that outputs XML) with

var obj = document.getElementById('combobox2');
populateDynamicCtrl(obj);


Change the name "combobox2" to the Id of the control you want to update.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)