Categories | Question details Back To List | ||
checkbox in dhtmlXCombo Hi, i using checkbox in dhtmlXCombo, and i select all checkbox, but when submit form and show with php var_dump($_POST); only show array(3) { ["alfa3"]=> string(0) "" ["alfa3_new_value"]=> string(4) "true" ["Submit"]=> string(6) "Enviar" } <div id="combo_zone3" style="width:200px; height:30px;"></div> <script> var z=new dhtmlXCombo("combo_zone3","alfa3",200, 'checkbox'); z.addOption([[1,1111],[2,2222],[3,3333],[4,4444],[5,5555]]); </script> What is the problem? Thanks...! Answer posted by Alex (support) on Apr 24, 2009 07:46 Hello, Only combo value is submitted. If you want to send values of the checked options, you can use the following approach: set onsubmit event handler that will place to some hidden input checked value. The example: <form onsubmit="get_checked()" ...><input type="hidden" id="check">...</form> ... function get_checked(){ document.getElementById("check").value = combo.getChecked(); } Answer posted by Jorge Arzuaga on Apr 28, 2009 06:20 Hi, how do it to selected some checkboxes, where put the code "checked".. Answer posted by Alex (support) on Apr 29, 2009 01:38 Hello, If you want to preselect some options, you can do in in the xml: <option value = "..." checked="1">...</option> Moreover combo API can be used: combo.setChecked(option_index,1); Answer posted by Jorge Arzuaga on Apr 29, 2009 06:22 Tanks is OK...! |