You are here:Home»KB»Programming»Javascript»My dhtmlxCombo Notes
Sunday, 10 December 2017 13:04

My dhtmlxCombo Notes

Written by

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

Read 1220 times Last modified on Sunday, 03 November 2024 15:25