These are some notes I made while integrating dhtmlxCombo into QWcrm.
- in the package the code you want is ../codebase/
- this codebase is prefilled with the dhxcombo_material skin
- you don't need ../codebase/dhtmlxcombo_deprecated.js
- you dont need ../codebase/fonts/ ? - doesnt seem to be called for what i use
- fontawesome, dunno what this is for, again, something else
- to add a new skin goto ../skins/ and into the folder of the skin you want. copy these files to ../codebase/ - the css will be overwritten
- for QWcrm I use skyblue
- only these JS and CSS are needed
<script src="/{$theme_js_dir}dhtmlxcombo/dhtmlxcombo.js"></script> <link rel="stylesheet" href="/{$theme_js_dir}dhtmlxcombo/fonts/font_roboto/roboto.css"/> <link rel="stylesheet" href="/{$theme_js_dir}dhtmlxcombo/dhtmlxcombo.css">
- roboto.css is for foreign characters, it might be used - cant be sure. i have not needed it yet
- If existing select object was defined as parent - dhtmlxCombo will take all data from it (list of options, sizes, tabindex, name)
Example code I used in QWcrm
// This Call Transforms the Select Element by ID to a real Combo Box var combo = dhtmlXComboFromSelect('description['+ iteration+']'); // This Call Transforms the Select Element by ID to a real Combo Box var combo = dhtmlXComboFromSelect('rate['+ iteration+']');
- The code above auto resizes the combobox
- var combo = can be removed unless you want to add options
var combo = dhtmlXComboFromSelect('rate['+ iteration+']'); combo.setSize(90); // This sets the width of the combo box and drop down options width //combo.setOptionWidth(200); // this sets the width of the options drop down ONLY
Links
- dhtmlxCombo Documentation | dhtmlx.com
- Starting notes | dhtmlx.com
- How to select an option in dhtmlxCombo without trigerring on - Uncategorized discussions - DHTMLX
- I have a combo box with onChange event attached. I want to be able to programmatically select an option and not trigger the onChange event.
- javascript - How to set dhtmlXCombo option by value - Stack Overflow