Hi,
I just discovered the scheduler for mobile devices.
I’m trying to load events from an external json file.
This is my html file:
<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no">
<script src="codebase/dhxscheduler_mobile.js" type="text/javascript"> </script>
<link rel="stylesheet" type="text/css" href="codebase/dhxscheduler_mobile.css">
<title>Initialization</title>
<script type="text/javascript" charset="utf-8">
scheduler.config.init_date = new Date(2011,06,01);
dhx.ready(function(){
dhx.ui.fullScreen();
dhx.ui({
view: "scheduler",
id: "scheduler"
});
$$("scheduler").load("stuff.json","json");
});
</script>
</head>
<body>
</body>
</html>
I followed the documentation and I managed to load a json using the parse method:
$$("scheduler_id").parse([
{ id:1, start_date:"2009-7-1 6:00", end_date:"2009-7-1 8:00", text:"Event 1"},
{ id:2, start_date:"2009-7-2 6:00", end_date:"2009-7-2 8:00", text:"Event 2"}
],"json");
However if I pass the above data to an external file and try to user the load method like in the above html, the data are not loaded. I have the html file and the stuff.json in the same path.
Any ideas why?