How can I use AW.UI.Combo to act like a real AJAX control with dynamic DB access? Can I perform filtering of multiple combos using this control? For example, can I filter on state in combo1, county in combo2 (based on combo1 selection) and city in combo3 (based on combo2 selection.
This basically makes 2 strings, being the record id's and the text to put into the next combo box which are sent back as a long combined string.
Then, when the response comes back to the js routine above, it runs a separate function which fills in the second combo box...
The string which has been passed back uses '|' to delimit the items of data, so the js routine turns them back into arrays. the comboName is the name of the second combo bos where the values are to be put in as options.
var dataNames = data.split('|');
var actLen =((dataNames.length -1) /2 );
var optList = new Array();
var optRecnos = new Array();
optList[i] = dataNames[i+actLen] ;
optRecnos[i] = dataNames[i];
var box2 = comboName;
box2.options.length = 0;
box2.options[i] = new Option(optList[i],optRecnos[i]);
I'm sure this could be done better and more efficiently but it does seem to work. Hope it helps.