Using dhtmlxGrid & dhtmlxScheduler in a same page
Hi,
I am try to use dhtmlxGrid & dhtmlxSchduler in a same page with Connector both.
but an error msg "Stack overflow at line:8" occured.
I found, if I remove"<script src='../dhtmlxConnector/codebase/connector.js'></script>", Scheduler work fine(display,update,delete OK),but Grid can display data only(Update,Delete failed).
#########################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Grid & Scheduler</title>
<link rel="stylesheet" type="text/css" href="../dhtmlxGrid/codebase/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="../dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_blue.css">
<link rel="stylesheet" type="text/css" href="../dhtmlxLayout/codebase/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="../dhtmlxLayout/codebase/skins/dhtmlxlayout_dhx_blue.css">
<link rel="stylesheet" type="text/css" href="../dhtmlxWindows/codebase/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="../dhtmlxWindows/codebase/skins/dhtmlxwindows_dhx_blue.css">
<script src="../dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="../dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="../dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script>
<script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js'></script>
<script src="../dhtmlxLayout/codebase/dhtmlxlayout.js"></script>
<script src="../dhtmlxWindows/codebase/dhtmlxwindows.js"></script>
<script src="../dhtmlxWindows/codebase/ext/dhtmlxwindows_wtb.js"></script>
<script src='../dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js'></script>
<script src='../dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js'></script>
<!--
<script src='../dhtmlxConnector/codebase/connector.js'></script>
//-->
<script src="../dhtmlxscheduler/codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../dhtmlxscheduler/codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style type="text/css" media="screen">
html, body{
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
</style>
<script type="text/javascript" charset="utf-8">
function init() {
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"location", height:43, type:"textarea", map_to:"details" },
{name:"time", height:72, type:"time", map_to:"auto"}
]
scheduler.config.first_hour=6;
scheduler.locale.labels.section_location="Location";
//scheduler.config.details_on_create=true;
//scheduler.config.details_on_dblclick=true;
scheduler.init('scheduler_here',null,"week");
scheduler.load("../dhtmlxscheduler/samples/initialization_loading/php/events.php?uid="+scheduler.uid());
var dp = new dataProcessor("../dhtmlxscheduler/samples/initialization_loading/php/events.php");
dp.init(scheduler);
}
</script>
</head>
<body onload="init();">
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
<div class="dhx_cal_navline">
<div class="dhx_cal_prev_button"> </div>
<div class="dhx_cal_next_button"> </div>
<div class="dhx_cal_today_button"></div>
<div class="dhx_cal_date"></div>
<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
</div>
<div class="dhx_cal_header">
</div>
<div class="dhx_cal_data">
</div>
</div>
<div id="parentId" style="position: relative; top: 20px; left: 20px; width: 1024px; height: 600px;"></div>
<script>
//var dhxLayout = new dhtmlXLayoutObject("parentId", "2U");
var dhxLayout = new dhtmlXLayoutObject(document.body, "2U");
dhxLayout.cells("a").setWidth(210);
var mygrid = dhxLayout.cells("a").attachGrid();
mygrid.selMultiRows = true;
mygrid.setImagePath("../dhtmlxGrid/codebase/imgs/");
var flds = " ,ProjNO.,Title";
mygrid.setHeader(flds);
mygrid.setInitWidths("20,60,111")
mygrid.setColTypes("ch,ro,ed");
mygrid.setColSorting("connector,connector,connector")
mygrid.enableSmartRendering(true);
mygrid.init();
mygrid.loadXML("codebase/Connector2.php?type=gr");
var dp = new dataProcessor("codebase/Connector2.php?type=gr");
dp.init(mygrid);
var obj = document.getElementById("scheduler_here");
dhxLayout.cells("b").attachObject(obj);
</script>
</body>
</html>
################################
is there a way to implement it?
THANKS !