Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael on Jul 01, 2009 11:06
open dhtmlx forum
Order of including dhtmlx-modules in html-header???

Is there a secure way to include several dhtmlx-Modules in the page header?
Which order is recommended?

We've encountered a nasty bug today; the dataprocessor functionality will be broken when connector.js is included first.

broken:

<!-- connector -->
<script type='text/javascript' src='../dhtmlx/dhtmlxConnector/codebase/connector.js'></script>
<!-- dataprocessor + ext -->
<script src='../dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.Ver2.1.js'></script>
<script src='../dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js'></script>

good:

<!-- dataprocessor + ext -->
<script src='../dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.Ver2.1.js'></script>
<script src='../dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js'></script>
<!-- connector -->
<script type='text/javascript' src='../dhtmlx/dhtmlxConnector/codebase/connector.js'></script>


Answer posted by Alex (support) on Jul 02, 2009 00:44

Hello, 

connector libraries should be always included last. They contain code that call methods of other components.

You can follow "from common to dependent" the schema for the libraries order:

1. dhtmlxcommon.js

2. main component libraries, for example:

dhtmlxgrid.js

dhtmlxgridcell.js

3. component extentions that you want to use, for example:

dhtmlxgrid_filter.js

4. if there are more components (for example you use also tree), points  2 and 3 for these components

5. dataprocessor

6. connector