Focal Point
[CLOSED] Chained combos: Detecting selection and load

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

September 24, 2012, 04:17 PM
mark66
[CLOSED] Chained combos: Detecting selection and load
Hi,

I have two chained combo boxes. Currently the user selects a record in combo1 and then has a 5-10 second wait for combo2 to load. I would like to be able to detect when the user has selected a value in the combo1 and when the results have transitioned to combo2 and use it to notify the user that something is happening.

I thought an onchange event on each would do the trick, with the combo1 onchange event being fired when the user selects the row from combo1 and then the 2nd being fired when combo2 loads. However this is not the case! Only the onchange event of the combo1 is triggered and this only when the combo2 loads?

Any ideas how I can capture both?

Thanks

Mark

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


WebFocus 765. iSeries v5r4
September 25, 2012, 03:53 PM
susannah
a couple of ways.
first, if your lists are short (and only you can decide what short is), then you can populate your lists with a single compound fex.
compound loads the entire javascript array into your browswer and doesn't go back to the server to populate the 2nd box when the first box is selected.
second, if your lists are too long for the compound method, then the complex method works,
2 separate fexes.
the first box has a default value of , say, 'zero', and that 'zero' has a description like 'select your country here';
the 2nd box's fex has a default value of, say, 'zero', and that 'zero' had a description like 'waiting for you to select your country'..and then has NOTHING below it.
the 2nd box's fex evaluates the first box (value='zero') and doesn't produce its entire long list until some actual value (anything but 'zero') gets selected in the 1st box, then the 2nd fex says 'oh you've selected something, ok i'll give you a whole long list now'
see?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID