Categories | Question details Back To List | ||
dhtmlxScheduler/dhtmlxTree conflicts I'm evaluating dhtmlxScheduler, dhtmlxTree and other dhtmlx components, and had trouble getting them to work on the same page. The problem was that I could create or edit an event in dhtmlxScheduler with dhtmlxTree also on the page, but the changes would not save to the database. If I removed the dhtmlxTree, the problem went away. I found one article in the knowledge base which sounded like the problem I was having, and it was recommended that if multiple independent onload handlers are required, use the following code: dhtmlxEvent(window,"load",function(){ any code here }) Article: http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=11736&ssr=yes&s=dhtmlxEvent This did not fix the data save problem. However, after much experimentation, I discovered that the order of inclusion of the javascript libraries for both of the components made a difference, and that the following order of inclusion made the data save work in the scheduler: <!-- dhtmlxTree stuff --> <!-- must be placed before scheduler stuff --> <script type="text/javascript"> window.dhx_globalImgPath="../common/imgs/"; </script> <script src="../common/dhtmlx.js" type="text/javascript" charset="utf-8"></script> <script src="../../codebase/connector.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="../common/dhtmlx.css" type="text/css" charset="utf-8" /> <!-- end dhtmlxTree stuff --> <!-- dhtmlxScheduler stuff --> <script src="../common/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="../common/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8" /> <!-- end dhtmlxScheduler stuff --> This may be documented somewhere, but I could not find any description. Since I want to use the dhmltx components together on the same page, I would like to know if there are more issues like this waiting to happen, or if there is a clear description of how to avoid these problems somewhere. I'm surprised that there are apparent conflicts between components from the same vendor. Mark Answer posted by Stanislav (support) on Oct 26, 2009 03:52 Which version of dhtmlxTree you are using? If you including dhtmlxscheduler.js , the next js files are not necessary ( the are already a part of dhtmlxscheduler.js ) - dhtmlxdataprocessor.js, dhtmlxconnector.js. Including them twice can be a reason of the problem. Try to change the list of includes as <script src="../common/dhtmlx.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="../common/dhtmlx.css" type="text/css" charset="utf-8" /> <script src="../common/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="../common/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8" /> >> I would like to know if there are more issues like this waiting to happen The components itself has not known conflicts and can be safely used on the same page. |