0

I'm using DHTMLX to generate calendar view.

I already follow tutorial from DHTMLX website about how to load the calender. Yes, it's work perfect but the data wont load.

This sample code from dhtmlx website

function init() {
    scheduler.config.multi_day = true;

    scheduler.config.xml_date="%Y-%m-%d %H:%i";
    scheduler.init('scheduler_here',new Date(2010,7,5),"week");
    scheduler.load("../common/events2010.xml");
}

Where init() function load when body has loaded

<body onload="init();">

i change event onload with jquery. And it seen run correctly

$(document).ready(function(){
    AnyTime.picker( "BookDateStart",
    { format: "%z-%m-%d %H:%i:00", firstDOW: 1 } );

    AnyTime.picker( "BookDateFinish",
    { format: "%z-%m-%d %H:%i:00", firstDOW: 1 } );

    scheduler.config.multi_day = true;
    scheduler.config.xml_date="%Y-%m-%d %H:%i";
    // scheduler.config.readonly=true;
    scheduler.init('scheduler_here',new Date(2010,7,5),"week");
    scheduler.load("../common/events2010.xml");
});

BUT when i change xml location the data won't load. I'm sure that xml location that i type is correct.

What's my mistake?

Kenjiro
  • 739
  • 1
  • 12
  • 31

1 Answers1

0

BUT when i change xml location

If you are moving xml file to the different server it will not work because of cross-domain security.

While xml file is located on the same server as html page - data must be loaded correctly.

Aquatic
  • 4,879
  • 3
  • 20
  • 28