Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ashok on Mar 26, 2008 04:53
open dhtmlx forum
How to load the multiple combo values in a Single response

Hi Team,
     I have one doubt in dhtmlxCombo. That is, I have created three div in the jsp namely name, surname,id. If i type in name, then the request will send.. In the response i need to update all the two remaining combo values list. that is surname's list and id's list related to name typed in namecombo. and if i change the surname combolist, then i will need the name's list and Id's List which is related to surname. and If I change the id's list value then i will need surname's list and name's list which is related to Id typed.

Example 1: If i typed "A" in the name combo. then i get the response as two separate maplist surname and MapList Id for the starting Index "A" as the name. How to update in the Surname and Id combos.

Example 2: If i typed "X" in the surname combo. then i get the response as two separate maplist name and MapList Id for the starting Index "X" as the surname. How to update in the name and Id combos.


Example 3: If i typed "1" in the Id combo. then i get the response as two separate maplist name and MapList surname for the starting Index "a" as the Id's. How to update in the name and surname combos.



Please guide me to achieve this issue.

Thanks & Regards,
Ashok
Answer posted by Support on Mar 26, 2008 06:07
You can try to use "onChange" event handler. When option is selected in some combo, you can get the value of this option and reload other two combos with new xml files. These xml should be formed by some server-side script, which gets option's value with the request.

For example:

z1 =  new dhtmlXCombo(...);
z2 =  new dhtmlXCombo(...);
z3 =  new dhtmlXCombo(...);
...
z1.attachEvent("onChange", function(){
    var value = z1.getActualValue();
    z2.clearAll();
    z2.loadXML(url+"?value="+value);  
    z3.clearAll();
    ...
})