Categories | Question details Back To List | ||
dhtmlXCombo and PHP hi, see my code : <script> var z1, z2; window.dhx_globalImgPath = BasePath + "/_libs/dhtmlx/dhtmlxCombo/codebase/imgs/"; var z1=new dhtmlXCombo("div_select_excepttype","alfa2",100, true); z1.enableFilteringMode(true); z1.attachEvent("onChange",testc); z1.loadXML(BasePath + "/_content/volmo/data/_all/_excepttype_c.php"); var z2=new dhtmlXCombo("div_select_und_id","alfa2",100); z2.enableFilteringMode(true); z2.loadXML(BasePath + "/_content/volmo/data/except/_undl_c.php?type=EXC_OPTION"); function testc () { z2.clearAll(); z2.loadXML(BasePath + "/_content/volmo/data/except/_undl_c.php?type=" + z1.getSelectedValue()); return true; } </script> When i change the value of z1, z2 must be reload but i can't reloaded z2, i don't understand ! Have you an idea ? thanks Answer posted by Support on Nov 28, 2008 01:35 The code above must reload "z2" combo, but only after value in "z1" changed. The onChange event occurs when - value selected by click or enter key pressing - new value entered and focus modev out of combo >> z2.loadXML(BasePath + "/_content/volmo/data/except/_undl_c.php?type=" + z1.getSelectedValue()); You can try to use z2.loadXML(BasePath + "/_content/volmo/data/except/_undl_c.php?type=" + z1.getActualValue()); Answer posted by stephane pautrat on Nov 28, 2008 02:20 hi, I changed the code. but I feel that my php page for the combo z2 does not reload! the system does not revive the page. an idea? thanks Answer posted by Support on Nov 28, 2008 02:45 It possible that browser cache url used for data fetching, you can try to randomize it as z2.loadXML(BasePath + "/_content/volmo/data/except/_undl_c.php?type=" + z1.getActualValue()+"&uid="+(new Date()).valueOf()); Answer posted by stephane pautrat on Nov 28, 2008 05:51 thank you for everything. but I do have a problem with my php code. I
have the impression that it no longer objects in my memory or a result
empty in the combo. Because the php file is not recharged, it's really strange |