I am trying to load events from a server into a dhtmlxScheduler instance. For now, I've exactly modeled the tutorials on dhtmlx's site. I am able to successfully create the scheduler and handle all javascript events and I can load a text xml doc into the scheduler to grab some test events. But, when I try to connect to the a test MySQL table, the response xml contains an xml update response before displaying the xml server response. I am not sure where this xml update is coming from. And, due to this xml update response, my actual xml cannot be parsed correctly because there are basically two root xml tags...
NOTE: I am able to load data from the same server and database for dhtmlxgrid components as well as update.
My Code:
scheduler instance:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Production Scheduler</title>
<link rel="STYLESHEET" type="text/css" href="../bms/dhtmlxScheduler_v4.4.0/codebase/dhtmlxscheduler.css">
<script src="../bms/dhtmlxScheduler_v4.4.0/codebase/dhtmlxscheduler.js">
</script>
<script>
function doOnLoad(){
var dp;
scheduler.config.xml_date = "%Y-%m-%d %H:%i:%s";
scheduler.init('scheduler_here', new Date(),"month");
scheduler.load("production_manager_sched_GET.php");
//dp=new dataProcessor("production_manager_sched_UPDATE.php");
//dp.init(scheduler);
}
</script>
</head>
<body onLoad="doOnLoad()">
<div id="scheduler_here" class="dhx_cal_container" style='width:1800px; height:950px; margin: auto;'>
<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>
</body>
</html>
My Server-side Script:
<?php
include("inc.php");
include("../bms/dhtmlxScheduler_v4.4.0/codebase/connector/db_mysqli.php");
include("../bms/dhtmlxScheduler_v4.4.0/codebase/connector/scheduler_connector.php");
$res=mysqli_connect($servername,$username,$password,$dbname);
$conn=new schedulerConnector($res,'MySQLi');
$conn->render_table("events2","id","start_date,end_date,text");
?>
My XML Response (as an alert):