Loading XML but not displaying the scheduler

Hi, I’m new to dhtmlx and new to scheduler. I’m trying to load the scheduler from the database, the xml is loading, but nothing is appearing in the screen.

index.html

[code]

Teste Scheduler
<link rel="stylesheet" type="text/css" href="../../style.css" media="all" />
<link rel="stylesheet" media="all" href="../../style/type/folks.css" />
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="../../style/css/ie7.css" media="all" />
<![endif]-->
<script type="text/javascript" src="../../style/js/jquery-1.5.min.js"></script>
<script type="text/javascript" src="../../style/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="../../style/js/ddsmoothmenu.js"></script>
<script type="text/javascript" src="../../style/js/scripts.js"></script>
<script src="../../scripts/scheduler/dhtmlxscheduler.js" type="text/javascript"></script>
<script src="../../scripts/scheduler/ext/dhtmlxscheduler_multisource.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../scripts/scheduler/dhtmlxscheduler.css" type="text/css">

<script>
    function init() {
        scheduler.config.xml_date="%Y-%m-%d %H:%i";
        scheduler.config.prevent_cache = true;

        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=4;
        scheduler.locale.labels.section_location="Location";
        //scheduler.config.details_on_create=true;
        //scheduler.config.details_on_dblclick=true;

        scheduler.init('scheduler_here', new Date(2009,10,1),"month");
        scheduler.setLoadMode("month");
        scheduler.load("carregarAgenda.php");

        var dp = new dataProcessor("carregarAgenda.php");
        dp.init(scheduler);
    }
</script>
 
 
[/code]

carregarAgenda.php

[code]<?php
include (’…/…/dao/Connection.php’);
include (’…/…/dao/scheduler/connector/db_mysqli.php’);
include (’…/…/dao/scheduler/connector/scheduler_connector.php’);

// Mysql
$dbtype = “MySQL”;
$res=mysql_connect(“localhost”, “root”, “*******”);
mysql_select_db(“sam”);

$calendario = new SchedulerConnector($res, $dbtype);

$calendario->render_table(“events”,“event_id”,“start_date,end_date,event_name,details”);

?>[/code]

My carregarAgenda.php is loading the xml, because it is returning right, but nothing is loading into the screen. Anyone used the scheduler into another

?

Try to open the carregarAgenda.php file directly in a browser.
If it generates valid xml - check that dates in xml are in correct format ( in your case it will be %Y-%m-%d %H:%i )
If php file doesn’t generate any visible xml - enable log and check it content.

docs.dhtmlx.com/doku.php?id=dhtm … tor:errors

The carregarAgenda.php loads perfectly and return the xml, the dates are in the correct form. Still dunno what’s going on… :confused:

I found the error, but still dunno how to fix.

If the

is inside another
it doesn’t show nothing, but if I simple put the
after the it works. But I need the scheduler inside a
.

Try to add some fixed styling for the scheduler’s container

<div id="scheduler_here" style="width:600px; height:400px;">

The position of DIV on the page doesn’t matter, but it must have some non-zero size ( as scheduler will use existing size of html container )

Thanks @Stanislav!

I put some fixed styling for the scheduler’s container and worked! :smiley: