Hi,
I’m a JS noob, but I managed to create a grouped select with external xml files and dhtmlxCombo. It works verry nice!
However ofcourse after selecting something should happen… I want to open a page with the name of the value of selection in z3.
How can I do this?
here is mu code so far:
Thanks a lot!
Hello,
in this case you can use onChange event handler instead of groups extention. For example:
var z3=new dhtmlXCombo(“combo_zone3”,“alfa4”,200);
z3.loadXML(“select_03.php”,function(){
z3.setComboValue(some_value)
});
z3.readonly(true);
var z2=new dhtmlXCombo(“combo_zone2”,“alfa3”,200);
z2.attachEvent(“onChange”,function(){
z3.loadXML(“select_03.php?parent=”+z2.getActualValue())
});
z2.loadXML(“select_02.php”) ;
z2.readonly(true);
var z=new dhtmlXCombo(“combo_zone”,“alfa2”,200, ‘image’);
z.attachEvent(“onChange”,function(){
z2.loadXML(“select_02.php?parent=”+z.getActualValue())
});
z.loadXML(“select_01.php”);
z.readonly(true);
Hi Alex, thank you for the quick reply!
However, there’s still no page change after I select the combo box. For example I want to go to the page test.com/index.php?+“value of z3”.
Can you show me how to do this?
Thanks in advance!
Stef
Possibly something as follows can be used:
z3.loadXML(“select_03.php”,function(){
z3.setComboValue(some_value)
z3.attachEvent(“onChange”,doOnChange)
});
function doOnChange(){ /this function will be called when the value of z3 combo is changed/
document.location.href= “http://www.test.com/index.php?value=”+z3.getActualValue();
}
Thank you Alex!
This is what I need.
regards,
Stef