我正在我的网站中实施 dthmlx 计划。在仪表板上,我需要在选项卡中显示三个调度程序。但是,第一个选项卡中的调度程序正在工作,但对于第二个调度程序,在启动对象时我收到错误“未定义调度程序”。以下是我的代码。
<script type="text/javascript" charset="utf-8">
function init() {
scheduler.config.multi_day = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.init('scheduler_here',new Date(2013,0,10),"week");
scheduler.load("./data/events.xml");
scheduler1 = Scheduler.getSchedulerInstance();
scheduler1.config.multi_day = true;
scheduler1.config.xml_date="%Y-%m-%d %H:%i";
scheduler1.init('scheduler_here_1',new Date(2013,0,10),"week");
scheduler1.load("./data/events.xml");
}
function show_minical(){
if (scheduler.isCalendarVisible())
scheduler.destroyCalendar();
else
scheduler.renderCalendar({
position:"dhx_minical_icon",
date:scheduler._date,
navigation:true,
handler:function(date,calendar){
scheduler.setCurrentView(date);
scheduler.destroyCalendar()
}
});
if (scheduler1.isCalendarVisible())
scheduler1.destroyCalendar();
else
scheduler1.renderCalendar({
position:"dhx_minical_icon_1",
date:scheduler1._date,
navigation:true,
handler:function(date,calendar){
scheduler1.setCurrentView(date);
scheduler1.destroyCalendar()
}
});
}
</script>
<body onload="init();">
<div id="scheduler_here" class="dhx_cal_container" style='width:50%; 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_minical_icon" id="dhx_minical_icon" onclick="show_minical()"> </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="scheduler_here_1" 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_minical_icon_1" id="dhx_minical_icon_1" onclick="show_minical()"> </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>
所有需要的文件都正确包含。究竟出了什么问题?