Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jerry T. on Oct 02, 2009 08:34
open dhtmlx forum
dhtmxScheduler - invalid XML - installation issue?

I have downloaded the dhtmlxScheduler and have it included in an ASP.NET project but I am getting an "Invalid XML" error on the scheduler.load using a sample events.xml that came with the downloaded code.

I've searched the documentation for any kind of information on what files are needed beyond just the codebase folder and I've added additional files from the full Suite product but don't think that is the issue.

Here is the code in my project:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="MyPrograms.ascx.vb" Inherits="MyPrograms" %>
<link href="StyleSheets/DashboardStyle.css" rel="stylesheet" type="text/css" />
<link href="codebase/dhtmlxscheduler.css" rel="stylesheet" type="text/css" />

<div>
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table width="100%" cellpadding="0px" cellspacing="0px" style="padding-bottom: 2px;">
<tr>
<td>
<label id="Label1" class="Label">My Programs</label>
</td>
<td align="right">
</td>
</tr>
</table>

<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>

<script src="codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
scheduler.init('scheduler_here', null, "month");
scheduler.load("events.xml");
</script>
</ContentTemplate>
</asp:UpdatePanel>
</div>

These are the files/folders in the codebase folder:

base.js
config.js
connector
connector.js
Copy of events.xml
dataprocessor_hook.js
dhtmlx.css
dhtmlx.js
dhtmlxcommon.js
dhtmlxdataprocessor.js
dhtmlxdataprocessor_debug.js
dhtmlxscheduler.css
dhtmlxscheduler.js
dhtmlxscheduler.js.debug
dhtmlxscheduler_recurring.css
dhtmlxscheduler_recurring.js
dhtmlxscheduler_units.js
event.js
events.xml
files.txt
ical.js
imgs
layout.css
lightbox.css
lightbox.js
load.js
locale.js
manifest.txt
note.css
property.js
recurring.css
recurring.js
repeat_template.html
scheduler.js
types
Answer posted by Stanislav (support) on Oct 02, 2009 10:27
You need only 
dhtmlxscheduler.css
dhtmlxscheduler.js

the files at source folders can be used to change something in existing logic, but are not necessary for common uses. 

>>I am getting an "Invalid XML"
a) Be sure that events.xml is really exist in specified location 
b) if you are using some specific web-server, be sure, that xml data is sent to client with text/xml content type
Answer posted by Jerry T. on Oct 02, 2009 10:45

Thanks. With all the copying and paths issues I've been running into with other things (plus this), I'd neglected to notice the .xml file was supposed to be in a sub-folder.

That's working but now my problem is that the calendar is only displaying the heading row (the days of the week), not an actual monthly-view calendar.  Is there anything I should be setting or looking into re: this?

Thanks.

Answer posted by Jerry T. on Oct 02, 2009 11:02
Nevermind.  Found the issue with that.  Needed to modify the div style to be a specific height/width in 'px' instead of a %.
Answer posted by Stanislav (support) on Oct 04, 2009 07:15
The size can be defined in percents as well, but you need to be sure that parent element has some fixed width|height in such case ( because any percent from zero will be a zero )